src/Graviton/ProxyBundle/Service/TransformationHandler.php
public function getRequestTransformations($api, $endpoint)
    {
        if (isset($this->requestTransformations[$api])) {
            $patterns = array_keys($this->requestTransformations[$api]);

            foreach ($patterns as $pattern) {
                preg_match($pattern, $endpoint, $matches);

                if (!empty($matches[1])) {
                    return $this->requestTransformations[$api][$pattern];
                }
            }
        }

        return [];
    }
public function getRequestTransformations($api, $endpoint)
    {
        if (isset($this->requestTransformations[$api])) {
            $patterns = array_keys($this->requestTransformations[$api]);

            foreach ($patterns as $pattern) {
                preg_match($pattern, $endpoint, $matches);

                if (!empty($matches[1])) {
                    return $this->requestTransformations[$api][$pattern];
                }
            }
        }

        return [];
    }
public function getRequestTransformations ( $ api , $ endpoint ) { if ( isset ( $ this -> requestTransformations [ $ api ] ) ) { $ patterns = array_keys ( $ this -> requestTransformations [ $ api ] ) ; foreach ( $ patterns as $ pattern ) { preg_match ( $ pattern , $ endpoint , $ matches ) ; if ( ! empty ( $ matches [ 1 ] ) ) { return $ this -> requestTransformations [ $ api ] [ $ pattern ] ; } } } return [ ] ; }
Returns the request transformations registered for a given API and endpoint.

@param  string $api      The API name
@param  string $endpoint The endpoint
@return array The transformations
Returns the request transformations registered for a given API and endpoint .