Beispiel #1
0
 /**
  * Sets the request, route, database, view and response variables.
  */
 public function __construct()
 {
     $this->route = Router::currentRoute();
     // Set database connection
     $this->db = ConnectionManager::connection();
 }
Beispiel #2
0
 /**
  * Connects to the configured database.
  */
 protected function connectDatabase()
 {
     if (!$this->databaseConfig) {
         return null;
     }
     $this->databaseConnection = ConnectionManager::create($this->databaseConfig);
 }