コード例 #1
0
ファイル: 500.php プロジェクト: HappyKennyD/teest
 public function get_response()
 {
     $response = Response::factory();
     $view = Kotwig_View::factory('errors/500');
     $response->status(500);
     $response->body($view->render());
     return $response;
 }
コード例 #2
0
ファイル: Kotwig.php プロジェクト: HappyKennyD/teest
 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);
 }
コード例 #3
0
ファイル: 404.php プロジェクト: HappyKennyD/teest
 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;
 }