public function __construct() { parent::__construct(); View::$theme = setting('theme'); View::$inheritFrom = APPPATH . '/views/default'; $this->db = Database::connection(); $this->getUser(); $this->title(setting('title')); }
/** * Private function to return the database connection. * * @return object */ private function connection() { return Database::connection($this->connectionName); }
* * This file is part of Ticketer. * * Ticketer is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3 only. * * Ticketer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Ticketer. If not, see <http://www.gnu.org/licenses/>. */ define('VENDORPATH', __DIR__); define('SYSPATH', __DIR__ . '/radium'); define('APPPATH', __DIR__ . "/ticketer"); require APPPATH . "/common.php"; // Bootstrap the framework require SYSPATH . '/bootstrap.php'; // Register the apps namespace as the default one Radium\Loader::registerNameSpace('Ticketer', APPPATH, true); // Load routes require APPPATH . "/config/routes.php"; // Connect to the database use Radium\Database; Database::factory('default', require dirname(__DIR__) . '/config/database.php'); // Load the translation use Radium\Language; $language = new Language(setting('language'));
/** * Returns the connection for the model. * * @return object * @access protected */ protected static function connection() { return Database::connection(static::$_connectionName); }