Exemplo n.º 1
0
 public function get_response()
 {
     $response = Response::factory();
     $view = Kotwig_View::factory('errors/500');
     $response->status(500);
     $response->body($view->render());
     return $response;
 }
Exemplo n.º 2
0
 public function before()
 {
     $this->default_template = $this->request->controller() . '/' . $this->request->action();
     if ($this->request->directory()) {
         // Preprend directory if needed
         $this->default_template = $this->request->directory() . '/' . $this->default_template;
     }
     $this->template = Kotwig_View::factory();
     Kotwig_View::set_global('_request', $this->request);
     Kotwig_View::set_global('_response', $this->response);
 }
Exemplo n.º 3
0
 public function get_response()
 {
     $this->user = Auth::instance()->get_user();
     $this->detect_language();
     $response = Response::factory();
     $view = Kotwig_View::factory('errors/404');
     $response->status(404);
     if ($this->getMessage()) {
         $view->set('no_translation', $this->getMessage());
     }
     $response->body($view->render());
     return $response;
 }