Beispiel #1
0
 public function handleRouteNotFound()
 {
     // @todo add route not found view
     $exception = new NotFoundException();
     if ($this->getStrategy() instanceof RestfulStrategy) {
         return $exception->getJsonResponse();
     }
     throw $exception;
 }
Beispiel #2
0
 /**
  * Handle a not found route
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 protected function handleNotFound()
 {
     $exception = new NotFoundException();
     if ($this->getStrategy() instanceof RestfulStrategy) {
         return $exception->getJsonResponse();
     }
     throw $exception;
 }