Added getQueryStringParameter method

This commit is contained in:
Alex Bilbie 2016-02-12 09:02:17 +00:00
parent d96f57d27f
commit bfcf7af4d8

View File

@ -239,6 +239,20 @@ abstract class AbstractGrant implements GrantTypeInterface
return (isset($request->getParsedBody()[$parameter])) ? $request->getParsedBody()[$parameter] : $default;
}
/**
* Retrieve query string parameter.
*
* @param string $parameter
* @param \Psr\Http\Message\ServerRequestInterface $request
* @param mixed $default
*
* @return null|string
*/
protected function getQueryStringParameter($parameter, ServerRequestInterface $request, $default = null)
{
return (isset($request->getQueryParams()[$parameter])) ? $request->getQueryParams()[$parameter] : $default;
}
/**
* Retrieve server parameter.
*