src/Graviton/ProxyBundle/Service/TransformationHandler.php
public function transformResponse($api, $endpoint, Response $responseIn, Response $responseOut)
    {
        $transformations = $this->getResponseTransformations($api, $endpoint);
        foreach ($transformations as $transformation) {
            $transformedRequest = $transformation->transformResponse($responseIn, $responseOut);
            $responseOut = $transformedRequest instanceof Response ? $transformedRequest : $responseOut;
        }
        return $responseOut;
    }
public function transformResponse($api, $endpoint, Response $responseIn, Response $responseOut)
    {
        $transformations = $this->getResponseTransformations($api, $endpoint);
        foreach ($transformations as $transformation) {
            $transformedRequest = $transformation->transformResponse($responseIn, $responseOut);
            $responseOut = $transformedRequest instanceof Response ? $transformedRequest : $responseOut;
        }
        return $responseOut;
    }
public function transformResponse ( $ api , $ endpoint , Response $ responseIn , Response $ responseOut ) { $ transformations = $ this -> getResponseTransformations ( $ api , $ endpoint ) ; foreach ( $ transformations as $ transformation ) { $ transformedRequest = $ transformation -> transformResponse ( $ responseIn , $ responseOut ) ; $ responseOut = $ transformedRequest instanceof Response ? $ transformedRequest : $ responseOut ; } return $ responseOut ; }
Applies all transformations defined for the given API and endpoint on a response.

@param  string   $api         The API name
@param  string   $endpoint    The endpoint
@param  Response $responseIn  The original response object
@param  Response $responseOut The response object to use for transformations
@return Response The transformed response
Applies all transformations defined for the given API and endpoint on a response .