/** * Constructor takes Db() instance which it uses for all database access. You should pass an instance in * because all the database accesses need to be in the same transactional context as whatever else you're doing. In * the case of BaseModel::insert(), BaseModel::update() and BaseModel::delete()they're always in a transactional context * so this is critical. If you don't pass an Db() instance then the constructor creates a new one, which is useful for * cases where you're reindexing and not in a transaction. */ public function __construct($opo_db = null, $ps_engine = null) { require_once __CA_MODELS_DIR__ . '/ca_metadata_elements.php'; parent::__construct($opo_db, $ps_engine); $this->opo_metadata_element = new ca_metadata_elements(); $this->opo_search_indexing_queue = new ca_search_indexing_queue(); }
public function __construct($opo_db = null, $ps_tablename = null) { parent::__construct($opo_db); if ($ps_tablename != null) { $this->ops_tablename = $ps_tablename; } $this->opa_options = array(); $this->opa_result_filters = array(); $this->opn_tablenum = $this->opo_datamodel->getTableNum($this->ops_tablename); $this->opa_tables = array(); }
public function __construct($siteID) { parent::__construct("contact"); $this->_siteID = $siteID; $this->_db = DatabaseConnection::getInstance(); //FIXME: Library code Session dependencies suck. $this->_userID = $_SESSION['CATS']->getUserID(); }