From a3a617171aaddd8ad569769d6ea4e602f7fa63f1 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Fri, 1 Feb 2013 15:28:40 +0000 Subject: [PATCH] $grantTypes static access --- src/OAuth2/AuthServer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OAuth2/AuthServer.php b/src/OAuth2/AuthServer.php index e499b738..c09ac8d5 100644 --- a/src/OAuth2/AuthServer.php +++ b/src/OAuth2/AuthServer.php @@ -85,7 +85,7 @@ class AuthServer if (is_null($identifier)) { $identifier = $grantType->getIdentifier(); } - $this->grantTypes[$identifier] = $grantType; + self::$grantTypes[$identifier] = $grantType; if ( ! is_null($grantType->getResponseType())) { $this->responseTypes[] = $grantType->getResponseType(); @@ -275,7 +275,7 @@ class AuthServer } // 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); } @@ -285,7 +285,7 @@ class AuthServer protected function getCurrentGrantType($grantType) { - return $this->grantTypes[$grantType]; + return self::$grantTypes[$grantType]; } }