Clear(); } // Clears all properties function Clear() { $this->CategoryID = 0; $this->Name = ''; $this->Description = ''; $this->DiscussionCount = 0; $this->Blocked = 0; $this->RoleBlocked = 0; $this->AllowedRoles = array(); } function FormatPropertiesForDatabaseInput() { $this->Name = FormatStringForDatabaseInput($this->Name, 1); $this->Description = FormatStringForDatabaseInput($this->Description, 1); } function FormatPropertiesForDisplay() { $this->Name = FormatStringForDisplay($this->Name, 1); $this->Description = FormatStringForDisplay($this->Description, 1); } function GetPropertiesFromDataSet($DataSet) { $this->CategoryID = ForceInt(@$DataSet['CategoryID'], 0); $this->Name = ForceString(@$DataSet['Name'], ''); $this->Description = ForceString(@$DataSet['Description'], ''); $this->DiscussionCount = ForceInt(@$DataSet['DiscussionCount'], 0); $this->Blocked = ForceBool(@$DataSet['Blocked'], 0); $this->RoleBlocked = ForceBool(@$DataSet['RoleBlocked'], 0); } function GetPropertiesFromForm(&$Context) { $this->CategoryID = ForceIncomingInt('CategoryID', 0); $this->Name = ForceIncomingString('Name', ''); $this->Description = ForceIncomingString('Description', ''); $this->AllowedRoles = ForceIncomingArray('CategoryRoleBlock', array()); } } ?>