public static function setDefaultMapper($mapper) { if (!$mapper instanceof SimDAL_Mapper) { return false; } self::$_defaultMapper = $mapper; }
public function __construct($mapper, $conf) { parent::__construct($mapper); if ($conf instanceof PDO) { $this->_conn = $conf; } else { $this->_filename = realpath($conf['filename']); } }
public function __construct($mapper, array $conf) { if (!isset($db['host'])) { throw new Exception("Database configuation doesn't specify database host"); } if (!isset($db['username'])) { throw new Exception("Database configuation doesn't specify database username"); } if (!isset($db['password'])) { throw new Exception("Database configuation doesn't specify database password"); } if (!isset($db['database'])) { throw new Exception("Database configuation doesn't specify database database"); } parent::__construct($mapper, $conf); $this->_host = $conf['host']; $this->_username = $conf['username']; $this->_password = $conf['password']; $this->_database = $conf['database']; }
public function __construct($mapper, $conf) { parent::__construct($mapper); $this->_filename = $conf['filename']; }
public function __construct(SimDAL_Mapper $mapper = null, $conf) { parent::__construct($mapper); }