Example #1
0
 public function __construct()
 {
     $this->app = Application::getInstance();
     $this->view = View::getInstance();
     $this->config = $this->app->getConfig();
     $this->input = InputData::getInstance();
     $this->httpContext = $this->app->getHttpContext();
     $this->db = new SimpleDB();
 }
Example #2
0
 public function displayError($errorCode)
 {
     try {
         $view = View::getInstance();
         $view->display('errors.' . $errorCode);
     } catch (\Exception $ex) {
         echo '<h1>' . $errorCode . '</h1>';
         exit;
     }
 }