예제 #1
0
파일: Mysql.php 프로젝트: gideaoms/monogen
 public function __construct()
 {
     $this->config = Config::getValue('database.connections.mysql');
     $this->drive = $this->config->driver;
     $this->host = $this->config->host;
     $this->dbname = $this->config->database;
     $this->user = $this->config->username;
     $this->password = $this->config->password;
     $this->charset = $this->config->charset;
     parent::__construct();
 }
예제 #2
0
파일: Model.php 프로젝트: gideaoms/monogen
 public function __construct()
 {
     $default = Config::getValue('database.default');
     switch ($default) {
         case 'mysql':
             $this->database = new Mysql();
             break;
         default:
             echo 'ERROR: database not configured.';
             die;
     }
 }