示例#1
0
 public function __construct(&$model = null)
 {
     parent::__construct();
     $this->model = $model;
     $this->setLanguage('fr_FR');
     $this->setTitle('');
 }
示例#2
0
 private function displayGenericHttpExceptionPage($e)
 {
     $response = Suricate::Request();
     if (is_readable(app_path() . '/views/Errors/' . $e->getStatusCode() . '.php')) {
         ob_start();
         include app_path() . '/views/Errors/' . $e->getStatusCode() . '.php';
         $body = ob_get_clean();
     } else {
         $innerHtml = '<h1>' . $e->getStatusCode() . '</h1>';
         $page = new Page();
         $body = $page->setTitle($e->getStatusCode())->render($innerHtml);
     }
     $response->setBody($body)->setHttpCode($e->getStatusCode());
     foreach ($e->getHeaders() as $header => $value) {
         $response->addHeader($header, $value);
     }
     $response->write();
     die;
 }