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(); }
public function displayError($errorCode) { try { $view = View::getInstance(); $view->display('errors.' . $errorCode); } catch (\Exception $ex) { echo '<h1>' . $errorCode . '</h1>'; exit; } }