예제 #1
0
파일: Base.php 프로젝트: zxwqxtu/flyPHP
 /**
  * 初始化
  *
  * @return void
  */
 protected function init()
 {
     $config = Config::database($this->dbType, $this->dbSelect);
     switch ($this->dbType) {
         case 'mongodb':
             $dbClass = '\\PhpDb\\Mongodb\\PhpMongo';
             break;
         default:
             $dbClass = '\\PhpDb\\Pdo\\PhpPdo';
     }
     $this->db = $dbClass::getInstance()->connect($config, $this->dbType);
 }