Exemple #1
0
 public function putAction(Application $app, Request $request, \RREST\Response $response, $slotId = null)
 {
     return $response->getRouterResponse();
 }
Exemple #2
0
 public function getAction(Application $app, Request $request, Response $response)
 {
     return $response->getRouterResponse();
 }
Exemple #3
0
 /**
  * @param RouterInterface $router
  * @param string          $statusCodeSucess
  * @param string          $format
  * @param string          $mimeType
  *
  * @return Response
  */
 protected function getResponse(RouterInterface $router, $statusCodeSucess, $format, $mimeType)
 {
     if ($format === false) {
         throw new \RuntimeException('Can\'t find a supported format for this Accept header.
             RRest only support json & xml.');
     }
     $response = new Response($router, $format, $statusCodeSucess);
     $response->setContentType($mimeType);
     return $response;
 }