示例#1
0
 public function __construct($config)
 {
     $this->name = 'default';
     $this->user = '******';
     $this->pass = '******';
     $this->host = 'localhost';
     $this->port = '3306';
     parent::__construct($config);
 }
示例#2
0
 public function __construct($config)
 {
     $this->name = 'postgres';
     $this->user = '******';
     $this->pass = '******';
     $this->host = 'localhost';
     $this->port = '5432';
     parent::__construct($config);
 }
示例#3
0
 /**
  * Close the target connection
  *
  * @return bool
  *   Returns true on success or false on failure.
  */
 public function close()
 {
     return $this->dbObj->close();
 }
示例#4
0
 public function setting($key = false, $value = false)
 {
     parent::setting($key, $value);
     $file = $this->path . $this->name . '.db';
     $this->path = ($this->path != ':memory:' and file_exists($file)) ? $file : ':memory:';
 }