Ejemplo n.º 1
0
 protected function prepareResponse()
 {
     if ($this->application->lastResponse instanceof Response) {
         $this->lastResponse = $this->application->lastResponse;
         return;
     }
     $responder = new Responder();
     if ($this->application->lastException instanceof \Exception) {
         $this->lastResponse = $responder->standard((string) $this->application->lastException, 503);
         return;
     }
     $this->lastResponse = $responder->standard("Not Found", 404);
 }
Ejemplo n.º 2
0
 public function handle(Request $req, Responder $resp)
 {
     return $resp->standard("Done");
 }