Renamed DataStore to DataStoreInterface
Also, the Interface now contains comments on the expected return values.
This commit is contained in:
		| @@ -18,12 +18,14 @@ | ||||
|  * @package OAuth | ||||
|  * @author Gary Jones <gary@garyjones.co.uk> | ||||
|  */ | ||||
| interface DataStore | ||||
| interface DataStoreInterface | ||||
| { | ||||
|     /** | ||||
|      * Validate the client. | ||||
|      * | ||||
|      * @param string $client_key | ||||
|      * | ||||
|      * @return JacobKiers\OAuth\Client | ||||
|      */ | ||||
|     public function lookupClient($client_key); | ||||
| 
 | ||||
| @@ -33,6 +35,8 @@ public function lookupClient($client_key); | ||||
|      * @param JacobKiers\OAuth\Client $client | ||||
|      * @param JacobKiers\OAuth\Token  $token | ||||
|      * @param string                 $token_type Request or access token | ||||
|      * | ||||
|      * @return JacobKiers\OAuth\Token | ||||
|      */ | ||||
|     public function lookupToken(Client $client, Token $token, $token_type); | ||||
| 
 | ||||
| @@ -43,6 +47,8 @@ public function lookupToken(Client $client, Token $token, $token_type); | ||||
|      * @param JacobKiers\OAuth\Token  $token | ||||
|      * @param string                 $nonce | ||||
|      * @param int                    $timestamp | ||||
|      * | ||||
|      * @return boolean | ||||
|      */ | ||||
|     public function lookupNonce(Client $client, Token $token, $nonce, $timestamp); | ||||
| 
 | ||||
| @@ -51,6 +57,8 @@ public function lookupNonce(Client $client, Token $token, $nonce, $timestamp); | ||||
|      * | ||||
|      * @param JacobKiers\OAuth\Client $client | ||||
|      * @param string                 $callback URI to store as the post-authorization callback. | ||||
|      * | ||||
|      * @return JacobKiers\OAuth\Token | ||||
|      */ | ||||
|     public function newRequestToken(Client $client, $callback = null); | ||||
| 
 | ||||
| @@ -63,6 +71,8 @@ public function newRequestToken(Client $client, $callback = null); | ||||
|      * @param JacobKiers\OAuth\Client $client | ||||
|      * @param JacobKiers\OAuth\Token  $token | ||||
|      * @param string                 $verifier | ||||
|      * | ||||
|      * @return JacobKiers\OAuth\Token | ||||
|      */ | ||||
|     public function newAccessToken(Client $client, Token $token, $verifier = null); | ||||
| } | ||||
| @@ -45,16 +45,16 @@ class Server | ||||
|     /** | ||||
|      * Data store object reference. | ||||
|      * | ||||
|      * @var JacobKiers\OAuth\DataStore | ||||
|      * @var JacobKiers\OAuth\DataStoreInterface | ||||
|      */ | ||||
|     protected $data_store; | ||||
|  | ||||
|     /** | ||||
|      * Construct OAuth server instance. | ||||
|      * | ||||
|      * @param JacobKiers\OAuth\DataStore $data_store | ||||
|      * @param JacobKiers\OAuth\DataStoreInterface $data_store | ||||
|      */ | ||||
|     public function __construct(DataStore $data_store) | ||||
|     public function __construct(DataStoreInterface $data_store) | ||||
|     { | ||||
|         $this->data_store = $data_store; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jacob Kiers
					Jacob Kiers