Exemplo n.º 1
0
 public static function setDefaultMapper($mapper)
 {
     if (!$mapper instanceof SimDAL_Mapper) {
         return false;
     }
     self::$_defaultMapper = $mapper;
 }
Exemplo n.º 2
0
 public function __construct($mapper, $conf)
 {
     parent::__construct($mapper);
     if ($conf instanceof PDO) {
         $this->_conn = $conf;
     } else {
         $this->_filename = realpath($conf['filename']);
     }
 }
Exemplo n.º 3
0
 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'];
 }
Exemplo n.º 4
0
 public function __construct($mapper, $conf)
 {
     parent::__construct($mapper);
     $this->_filename = $conf['filename'];
 }
Exemplo n.º 5
0
 public function __construct(SimDAL_Mapper $mapper = null, $conf)
 {
     parent::__construct($mapper);
 }