/** * Delegate to the database adapter. * * Used primarily as a convenience method. For example, you can call * fetchOne() and fetchAll() directly from this object. * * @param string $m Method name. * @param array $a Method arguments. * @return mixed */ public function __call($m, $a) { if (!method_exists($this->_db, $m) && !method_exists($this->_db->getAdapter(), $m)) { throw new BadMethodCallException("Method named '{$m}' does not exist or is not callable."); } return call_user_func_array(array($this->_db, $m), $a); }
/** * @param Omeka_Db $db Database object. */ public function __construct(Omeka_Db $db) { parent::__construct($db->getAdapter(), $db->User, 'username', 'password', 'SHA1(CONCAT(salt, ?)) AND active = 1'); }
/** * Record the migration timestamp in the schema_migrations table. * * @param string $time * @return void */ private function _recordMigration($time) { $this->_db->getAdapter()->insert($this->_getMigrationTableName(), array('version' => $time)); }