handleExposureSettingsFromHttpMethod() public method

public handleExposureSettingsFromHttpMethod ( DrestCommon\Request\Request $request, RouteMetaData $route, Drest\EntityManagerRegistry $emr ) : DrestCommon\Representation\AbstractRepresentation
$request DrestCommon\Request\Request
$route Drest\Mapping\RouteMetaData
$emr Drest\EntityManagerRegistry
return DrestCommon\Representation\AbstractRepresentation
Beispiel #1
0
 /**
  * Execute a dispatched request
  * @throws Route\NoMatchException|\Exception
  */
 protected function execute()
 {
     if (($route = $this->determineRoute()) instanceof RouteMetaData) {
         // Set the matched service object and the error handler into the service class
         $this->service->setMatchedRoute($route);
         // Get the representation to be used - always successful or it throws an exception
         $this->service->setRepresentation($this->representationManager->handleExposureSettingsFromHttpMethod($this->getRequest(), $route, $this->emr));
         $this->service->setErrorHandler($this->getErrorHandler());
         // Set up the service for a new request
         $this->service->setUpAndRunRequest();
     }
 }