Example #1
0
 public function __construct()
 {
     parent::__construct();
     View::$theme = setting('theme');
     View::$inheritFrom = APPPATH . '/views/default';
     $this->db = Database::connection();
     $this->getUser();
     $this->title(setting('title'));
 }
Example #2
0
 /**
  * Private function to return the database connection.
  *
  * @return object
  */
 private function connection()
 {
     return Database::connection($this->connectionName);
 }
Example #3
0
 /**
  * Returns the connection for the model.
  *
  * @return object
  * @access protected
  */
 protected static function connection()
 {
     return Database::connection(static::$_connectionName);
 }