Drest\Manager\Representation::handlePushExposureConfiguration PHP Method

handlePushExposureConfiguration() protected method

Handle a push requests' exposure configuration (POST/PUT/PATCH)
protected handlePushExposureConfiguration ( RouteMetaData $route, DrestCommon\Representation\AbstractRepresentation $representation ) : DrestCommon\Representation\AbstractRepresentation
$route Drest\Mapping\RouteMetaData - the matched route
$representation DrestCommon\Representation\AbstractRepresentation - the representation class to be used
return DrestCommon\Representation\AbstractRepresentation $representation
    protected function handlePushExposureConfiguration(RouteMetaData $route, AbstractRepresentation $representation)
    {
        $representation = $representation::createFromString($this->request->getBody());
        // Write the filtered expose data
        $representation->write(ExposeFields::create($route)->configureExposeDepth($this->emr, $this->config->getExposureDepth(), $this->config->getExposureRelationsFetchType())->configurePushRequest($representation->toArray()));
        return $representation;
    }