Пример #1
0
 public function serve()
 {
     try {
         NeechySecurity::start_session();
         NeechySecurity::prevent_csrf();
         $this->request = NeechyRequest::load();
         $this->validate_environment();
         $handler = $this->load_handler();
         $response = $handler->handle();
     } catch (NeechyError $e) {
         $handler = new ErrorHandler($this->request);
         $response = $handler->handle_error($e);
     }
     $response->send_headers();
     $response->render();
 }
Пример #2
0
 /**
  * Test Fixtures
  */
 public function setUp()
 {
     # Suppresses error in Travis-CI
     @NeechySecurity::start_session();
 }