public function __construct() { $this->app = \PFCS\FMK\App::getInstance(); $this->view = \PFCS\FMK\View::getInstance(); $this->config = \PFCS\FMK\Config::getInstance(); $this->input = \PFCS\FMK\InputData::getInstance(); // $this->session = $this->app->getSession(); we need Http Context maybe :P // View::logged((bool)$this->session->userId); // View::role($this->session->user['role']); }
public function __construct($connection = null) { if ($connection instanceof \PDO) { $this->db = $connection; } elseif ($connection != null) { $this->db = \PFCS\FMK\App::getInstance()->getDBConnection($connection); $this->connection = $connection; } else { $this->db = \PFCS\FMK\App::getInstance()->getDBConnection($this->connection); } }
private function __construct() { $this->config = App::getInstance()->getConfig(); }
<?php error_reporting(E_ALL ^ E_NOTICE); require '../../FMK/App.php'; $app = \PFCS\FMK\App::getInstance(); $app->run();