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 displayError($errorCode)
 {
     try {
         $view = \PFCS\FMK\View::getInstance();
         View::title('Error ' . $errorCode);
         $view->appendToLayout('header', 'header');
         $view->appendToLayout('body', 'errors.' . $errorCode);
         $view->appendToLayout('footer', 'footer');
         $view->display('layouts.default');
     } catch (\Exception $ex) {
         $error = \PFCS\FMK\Common::headerStatus($errorCode);
         echo '<h1>' . $error . '</h1>';
         exit;
     }
 }