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(); }
public function __construct($theme = 'bootstrap') { $this->theme_path = $this->load_theme_path($theme); $this->theme_url_path = sprintf('themes/%s/', $theme); $this->request = NeechyRequest::load(); }