Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Oauth_Token Class Reference

Public Member Functions

 __construct (Zend_Http_Response $response=null, Zend_Oauth_Http_Utility $utility=null)
 Constructor; basic setup for any Token subclass.
 
 isValid ()
 Attempts to validate the Token parsed from the HTTP response - really it's just very basic existence checks which are minimal.
 
 getResponse ()
 Return the HTTP response object used to initialise this instance.
 
 setTokenSecret ($secret)
 Sets the value for the this Token's secret which may be used when signing requests with this Token.
 
 getTokenSecret ()
 Retrieve this Token's secret which may be used when signing requests with this Token.
 
 setParam ($key, $value)
 Sets the value for a parameter (e.g.
 
 setParams (array $params)
 Sets the value for some parameters (e.g.
 
 getParam ($key)
 Get the value for a parameter (e.g.
 
 setToken ($token)
 Sets the value for a Token.
 
 getToken ()
 Gets the value for a Token.
 
 __get ($key)
 Generic accessor to enable access as public properties.
 
 __set ($key, $value)
 Generic mutator to enable access as public properties.
 
 toString ()
 Convert Token to a string, specifically a raw encoded query string.
 
 __toString ()
 Convert Token to a string, specifically a raw encoded query string.
 
 __sleep ()
 Limit serialisation stored data to the parameters.
 
 __wakeup ()
 After serialisation, re-instantiate a HTTP utility class for use.
 

Public Attributes

const TOKEN_PARAM_KEY = 'oauth_token'
 @+ Token constants
 
const TOKEN_SECRET_PARAM_KEY = 'oauth_token_secret'
 
const TOKEN_PARAM_CALLBACK_CONFIRMED = 'oauth_callback_confirmed'
 

Protected Member Functions

 _parseParameters (Zend_Http_Response $response)
 Parse a HTTP response body and collect returned parameters as raw url decoded key-value pairs in an associative array.
 

Protected Attributes

 $_params = array()
 
 $_response = null
 
 $_httpUtility = null
 

Constructor & Destructor Documentation

__construct ( Zend_Http_Response  $response = null,
Zend_Oauth_Http_Utility  $utility = null 
)

Constructor; basic setup for any Token subclass.

Parameters
null | Zend_Http_Response$response
null | Zend_Oauth_Http_Utility$utility
Returns
void

Member Function Documentation

__get (   $key)

Generic accessor to enable access as public properties.

Returns
string
__set (   $key,
  $value 
)

Generic mutator to enable access as public properties.

Parameters
string$key
string$value
Returns
void
__sleep ( )

Limit serialisation stored data to the parameters.

__toString ( )

Convert Token to a string, specifically a raw encoded query string.

Aliases to self::toString()

Returns
string
__wakeup ( )

After serialisation, re-instantiate a HTTP utility class for use.

_parseParameters ( Zend_Http_Response  $response)
protected

Parse a HTTP response body and collect returned parameters as raw url decoded key-value pairs in an associative array.

Parameters
Zend_Http_Response$response
Returns
array
getParam (   $key)

Get the value for a parameter (e.g.

token secret or other).

Parameters
string$key
Returns
mixed
getResponse ( )

Return the HTTP response object used to initialise this instance.

Returns
Zend_Http_Response
getToken ( )

Gets the value for a Token.

Returns
string
getTokenSecret ( )

Retrieve this Token's secret which may be used when signing requests with this Token.

Returns
string
isValid ( )

Attempts to validate the Token parsed from the HTTP response - really it's just very basic existence checks which are minimal.

Returns
bool
setParam (   $key,
  $value 
)

Sets the value for a parameter (e.g.

token secret or other) and run a simple filter to remove any trailing newlines.

Parameters
string$key
string$value
Returns
Zend_Oauth_Token
setParams ( array  $params)

Sets the value for some parameters (e.g.

token secret or other) and run a simple filter to remove any trailing newlines.

Parameters
array$params
Returns
Zend_Oauth_Token
setToken (   $token)

Sets the value for a Token.

Parameters
string$token
Returns
Zend_Oauth_Token
setTokenSecret (   $secret)

Sets the value for the this Token's secret which may be used when signing requests with this Token.

Parameters
string$secret
Returns
Zend_Oauth_Token
toString ( )

Convert Token to a string, specifically a raw encoded query string.

Returns
string

Member Data Documentation

$_httpUtility = null
protected
$_params = array()
protected
$_response = null
protected
const TOKEN_PARAM_CALLBACK_CONFIRMED = 'oauth_callback_confirmed'
const TOKEN_PARAM_KEY = 'oauth_token'

@+ Token constants

const TOKEN_SECRET_PARAM_KEY = 'oauth_token_secret'