Bastian Hofmann

Merge pull request #7 from vslinko/interface

Implement OAuth2_DataStore_Interface instead of OAuth2_DataStore_Abstract
@@ -94,7 +94,7 @@ class OAuth2_Service @@ -94,7 +94,7 @@ class OAuth2_Service
94 private $_configuration; 94 private $_configuration;
95 95
96 /** 96 /**
97 - * @var OAuth2_DataStore_Abstract 97 + * @var OAuth2_DataStore_Interface
98 */ 98 */
99 private $_dataStore; 99 private $_dataStore;
100 100
@@ -106,12 +106,12 @@ class OAuth2_Service @@ -106,12 +106,12 @@ class OAuth2_Service
106 /** 106 /**
107 * @param OAuth2_Client $client 107 * @param OAuth2_Client $client
108 * @param OAuth2_Service_Configuration $configuration 108 * @param OAuth2_Service_Configuration $configuration
109 - * @param OAuth2_DataStore_Abstract $dataStore 109 + * @param OAuth2_DataStore_Interface $dataStore
110 * @param string $scope optional 110 * @param string $scope optional
111 */ 111 */
112 public function __construct(OAuth2_Client $client, 112 public function __construct(OAuth2_Client $client,
113 OAuth2_Service_Configuration $configuration, 113 OAuth2_Service_Configuration $configuration,
114 - OAuth2_DataStore_Abstract $dataStore, 114 + OAuth2_DataStore_Interface $dataStore,
115 $scope = null) { 115 $scope = null) {
116 $this->_client = $client; 116 $this->_client = $client;
117 $this->_configuration = $configuration; 117 $this->_configuration = $configuration;
@@ -397,7 +397,7 @@ class OAuth2_Token @@ -397,7 +397,7 @@ class OAuth2_Token
397 } 397 }
398 } 398 }
399 399
400 -class OAuth2_DataStore_Session extends OAuth2_DataStore_Abstract 400 +class OAuth2_DataStore_Session implements OAuth2_DataStore_Interface
401 { 401 {
402 public function __construct() { 402 public function __construct() {
403 session_start(); 403 session_start();
@@ -423,17 +423,17 @@ class OAuth2_DataStore_Session extends OAuth2_DataStore_Abstract @@ -423,17 +423,17 @@ class OAuth2_DataStore_Session extends OAuth2_DataStore_Abstract
423 } 423 }
424 } 424 }
425 425
426 -abstract class OAuth2_DataStore_Abstract 426 +interface OAuth2_DataStore_Interface
427 { 427 {
428 /** 428 /**
429 * @param OAuth2_Token $token 429 * @param OAuth2_Token $token
430 */ 430 */
431 - abstract function storeAccessToken(OAuth2_Token $token); 431 + function storeAccessToken(OAuth2_Token $token);
432 432
433 /** 433 /**
434 * @return OAuth2_Token 434 * @return OAuth2_Token
435 */ 435 */
436 - abstract function retrieveAccessToken(); 436 + function retrieveAccessToken();
437 } 437 }
438 438
439 class OAuth2_Client 439 class OAuth2_Client