/** * Constructor * * @param string Table name * @param string * @param string DB ID name * @param array|NULL Database row */ function GenericCategory($tablename, $prefix = '', $dbIDname = 'ID', $db_row = NULL) { global $Debuglog; // Call parent constructor: parent::GenericElement($tablename, $prefix, $dbIDname, $db_row); if ($db_row != NULL) { $parentIDfield = $prefix . 'parent_ID'; $this->parent_ID = $db_row->{$parentIDfield}; } }
/** * Constructor * * @param string Name of table in database * @param string Prefix of fields in the table * @param string Name of the ID field (including prefix) * @param object DB row */ function GenericOrdered($tablename, $prefix = '', $dbIDname = 'ID', $db_row = NULL) { global $Debuglog; // Call parent constructor: parent::GenericElement($tablename, $prefix, $dbIDname, $db_row); if ($db_row != NULL) { $this->order = $db_row->{$prefix . 'order'}; } $Debuglog->add("Created element <strong>{$this->name}</strong>", 'dataobjects'); }