Example #1
0
 public function startConnection()
 {
     if (!empty($this->config->database) && is_null(self::$connection)) {
         self::$connection = new Connection($this->config->database);
         if (defined('DEBUG') && DEBUG === TRUE) {
             self::$connection->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
         }
         Model::_setConnection(self::$connection);
     } else {
     }
 }