Beispiel #1
0
 public function route()
 {
     try {
         $callable = $this->resolver->resolve($this->request->getMethod());
         \Request::replace($this->request->rawData());
         $this->executeRequest($callable);
     } catch (\Exception $e) {
     }
     return null;
 }
Beispiel #2
0
 public function route()
 {
     try {
         \Request::replace($this->request->rawData());
         $callable = $this->resolver->resolve($this->request->getMethod());
         $result = $this->executeRequest($callable);
         $response = $this->response_builder->buildFromResult($this->request, $result);
         $this->fireBeforeOutputEvent($response, $callable);
         return $response;
     } catch (\Exception $e) {
         return $this->response_builder->buildFromException($this->request, $e);
     }
 }