public function __construct()
 {
     $this->app = \Framework\App::getInstance();
     $this->view = \Framework\View::getInstance();
     $this->config = $this->app->getConfig();
     $this->input = \Framework\InputData::getInstance();
 }
Esempio n. 2
0
 public function __construct()
 {
     $this->app = App::getInstance();
     $this->view = View::getInstance();
     $this->config = $this->app->getConfig();
     $this->input = InputData::getInstance();
     $this->session = $this->app->getSession();
     $this->db = new SimpleDB();
 }
 public function __construct()
 {
     $this->app = App::getInstance();
     $this->view = View::getInstance();
     $this->config = $this->app->getConfig();
     $this->input = InputData::getInstance();
     $this->db = new SimpleDatabase();
     $this->session = $this->app->getSession();
     $this->path = isset($this->config->app['default_path']) ? $this->config->app['default_path'] : null;
 }
 public function __construct()
 {
     $this->app = App::getInstance();
     $this->view = View::getInstance();
     $this->config = $this->app->getConfig();
     $this->input = InputData::getInstance();
     if (is_null($this->session)) {
         $this->session = new NativeSession('session');
     }
 }
Esempio n. 5
0
 public function displayError($error)
 {
     try {
         $view = View::getInstance();
         $view->display('errors.' . $error);
     } catch (\Exception $ex) {
         Common::headerStatus($error);
         echo '<h1>' . $error . '</h1>';
         exit;
     }
 }
Esempio n. 6
0
 public function displayError($code)
 {
     try {
         $view = \Framework\View::getInstance();
         $view->display('errors.' . $code);
     } catch (\Exception $exc) {
         \Framework\Common::headerStatus($code);
         echo '<h1>' . $error . '</h1>';
         exit;
     }
 }
 public function displayError(\Exception $error)
 {
     $message = ['error' => $error->getMessage(), 'isLogged' => $this->_session->userid];
     try {
         $view = View::getInstance();
         $view->display('error', $message);
     } catch (\Exception $ex) {
         Common::headerStatus($error);
         echo '<h1>' . $error->getMessage() . '</h1>';
         exit;
     }
 }