/** * Processes a generic request and fills the response with the default view * * @param \F3\FLOW3\MVC\RequestInterface $request The request * @param \F3\FLOW3\MVC\ResponseInterface $response The response * @return void * @author Robert Lemke <*****@*****.**> */ public function processRequest(\F3\FLOW3\MVC\RequestInterface $request, \F3\FLOW3\MVC\ResponseInterface $response) { parent::processRequest($request, $response); $this->standardView->setControllerContext($this->controllerContext()); switch (get_class($request)) { case 'F3\\FLOW3\\MVC\\Web\\Request': $response->setContent($this->standardView->render()); break; default: $response->setContent("\nWelcome to FLOW3!\n\n" . "This is the default view of the FLOW3 MVC object. You see this message because no \n" . "other view is available. Please refer to the Developer's Guide for more information \n" . "how to create and configure one.\n\n" . "Have fun! The FLOW3 Development Team\n"); } }
/** * Processes a generic request and fills the response with the default view * * @param \F3\FLOW3\MVC\RequestInterface $request The request * @param \F3\FLOW3\MVC\ResponseInterface $response The response * @return void * @author Robert Lemke <*****@*****.**> * @author Karsten Dambekalns <*****@*****.**> * @api */ public function processRequest(\F3\FLOW3\MVC\RequestInterface $request, \F3\FLOW3\MVC\ResponseInterface $response) { parent::processRequest($request, $response); $this->notFoundView->setControllerContext($this->controllerContext); if ($this->exception !== NULL) { $this->notFoundView->assign('errorMessage', $this->exception->getMessage()); } switch (get_class($request)) { case 'F3\\FLOW3\\MVC\\Web\\Request': $response->setStatus(404); $response->setContent($this->notFoundView->render()); break; default: $response->setContent("\n404 Not Found\n\n" . "No controller could be resolved which would match your request.\n"); } }