protected function getParameterReplacements($parameters, TokenInterface $token)
    {
        $replacements = $parameters;
        foreach ($parameters as $key => $param) {
            if (strpos($param, '{') === 0 && strpos($param, '}') === strlen($param) - 1) {
                $replacements[$key] = $token->getParam(substr($param, 1, -1));
            }
        }
        return $replacements;
    }
protected function getParameterReplacements($parameters, TokenInterface $token)
    {
        $replacements = $parameters;
        foreach ($parameters as $key => $param) {
            if (strpos($param, '{') === 0 && strpos($param, '}') === strlen($param) - 1) {
                $replacements[$key] = $token->getParam(substr($param, 1, -1));
            }
        }
        return $replacements;
    }
protected function getParameterReplacements ( $ parameters , TokenInterface $ token ) { $ replacements = $ parameters ; foreach ( $ parameters as $ key => $ param ) { if ( strpos ( $ param , '{' ) === 0 && strpos ( $ param , '}' ) === strlen ( $ param ) - 1 ) { $ replacements [ $ key ] = $ token -> getParam ( substr ( $ param , 1 , - 1 ) ) ; } } return $ replacements ; }
Replace values in an array with parameters from a token.

@param array $parameters
An array with parameters to replace. Values surrounded with {} will be
replaced with their corresponding token parameter.
@param \ZendOAuth\Token\TokenInterface $token
The token with the parameters.

@return array
An array of replacements, keyed by the corresponding array key in
$parameters.
Replace values in an array with parameters from a token .