Signed-off-by: Alex Bilbie <alex@alexbilbie.com>
This commit is contained in:
Alex Bilbie 2012-10-05 15:02:56 +01:00
parent 5c13c3ee54
commit ec191cffe1

View File

@ -2,32 +2,19 @@
namespace Oauth2\Client;
/**
* OAuth2 Token
*
* @package OAuth2
* @category Token
* @author Phil Sturgeon
* @copyright (c) 2011 HappyNinjas Ltd
*/
abstract class Token
{
/**
* Create a new token object.
*
* $token = OAuth2_Token::factory($name);
*
* @param string token type
* @param array token options
* @return Token
*/
public static function factory($name = 'access', array $options = null)
{
$name = ucfirst(strtolower($name));
include_once 'Token/'.$name.'.php';
include_once 'Token/'.ucfirst(strtolower($name)).'.php';
$class = $name.'Token';
@ -37,9 +24,6 @@ abstract class Token
/**
* Return the value of any protected class variable.
*
* // Get the token secret
* $secret = $token->secret;
*
* @param string variable name
* @return mixed
*/
@ -51,9 +35,6 @@ abstract class Token
/**
* Return a boolean if the property is set
*
* // Get the token secret
* if ($token->secret) exit('YAY SECRET');
*
* @param string variable name
* @return bool
*/