/** * Constructor - called from child classes * * @param object $db Database object {@link XoopsDatabase} * @param string $itemname Object to be managed * @param string $keyname Name of the table key that uniquely identify each {@link icms_ipf_Object} * @param string $idenfierName Name of the field which properly identify the {@link icms_ipf_Object} * @param string $summaryName Name of the field which will be use as a summary for the object * @param string $modulename Name of the module controlling this object * @return object */ public function __construct(&$db, $itemname, $keyname, $idenfierName, $summaryName, $modulename) { parent::__construct($db); $this->_itemname = $itemname; // Todo: Autodect module if ($modulename == '') { $this->_moduleName = 'system'; $this->table = $db->prefix($itemname); } else { $this->_moduleName = $modulename; $this->table = $db->prefix($modulename . "_" . $itemname); } $this->keyName = $keyname; if ($modulename == 'icms') { $classname = $modulename . '_' . $itemname . '_Object'; } else { $classname = 'mod_' . $modulename . '_' . ucfirst($itemname); } /** * @todo this could probably be removed after refactopring is completed * to be evaluated... */ if (!class_exists($classname)) { $classname = ucfirst($modulename) . ucfirst($itemname); } $this->className = $classname; $this->identifierName = $idenfierName; $this->summaryName = $summaryName; $this->_page = $itemname . ".php"; $this->_modulePath = ICMS_ROOT_PATH . "/modules/" . $this->_moduleName . "/"; $this->_moduleUrl = ICMS_URL . "/modules/" . $this->_moduleName . "/"; $this->_uploadPath = ICMS_UPLOAD_PATH . "/" . $this->_moduleName . "/"; $this->_uploadUrl = ICMS_UPLOAD_URL . "/" . $this->_moduleName . "/"; }
public function XoopsObjectHandler(&$db) { parent::__construct($db); $this->_deprecated = icms_core_Debug::setDeprecated('icms_core_ObjectHandler', sprintf(_CORE_REMOVE_IN_VERSION, '1.4')); }