$grantTypes static access

This commit is contained in:
Alex Bilbie 2013-02-01 15:28:40 +00:00
parent 47731ce901
commit a3a617171a

View File

@ -85,7 +85,7 @@ class AuthServer
if (is_null($identifier)) { if (is_null($identifier)) {
$identifier = $grantType->getIdentifier(); $identifier = $grantType->getIdentifier();
} }
$this->grantTypes[$identifier] = $grantType; self::$grantTypes[$identifier] = $grantType;
if ( ! is_null($grantType->getResponseType())) { if ( ! is_null($grantType->getResponseType())) {
$this->responseTypes[] = $grantType->getResponseType(); $this->responseTypes[] = $grantType->getResponseType();
@ -275,7 +275,7 @@ class AuthServer
} }
// Ensure grant type is one that is recognised and is enabled // Ensure grant type is one that is recognised and is enabled
if ( ! in_array($authParams['grant_type'], array_keys($this->grantTypes))) { if ( ! in_array($authParams['grant_type'], array_keys(self::$grantTypes))) {
throw new Exception\ClientException(sprintf(self::$exceptionMessages['unsupported_grant_type'], $authParams['grant_type']), 7); throw new Exception\ClientException(sprintf(self::$exceptionMessages['unsupported_grant_type'], $authParams['grant_type']), 7);
} }
@ -285,7 +285,7 @@ class AuthServer
protected function getCurrentGrantType($grantType) protected function getCurrentGrantType($grantType)
{ {
return $this->grantTypes[$grantType]; return self::$grantTypes[$grantType];
} }
} }