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(); }
public function __construct() { $default = Config::getValue('database.default'); switch ($default) { case 'mysql': $this->database = new Mysql(); break; default: echo 'ERROR: database not configured.'; die; } }