API Documentation

Oauth/Token.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Oauth
version
$Id: Token.php 20232 2010-01-12 17:56:33Z matthew $
Classes
Zend_Oauth_Token

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Oauth_Token

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Oauth
Constants
TOKEN_PARAM_KEY
TOKEN_SECRET_PARAM_KEY
TOKEN_PARAM_CALLBACK_CONFIRMED
Properties
$_params
$_response
$_httpUtility
Methods
__construct
isValid
getResponse
setTokenSecret
getTokenSecret
setParam
setParams
getParam
setToken
getToken
__get
__set
toString
__toString
_parseParameters
__sleep
__wakeup

Description

Constants

TOKEN_PARAM_KEY

 TOKEN_PARAM_KEY = 'oauth_token'

Details

value
oauth_token

TOKEN_SECRET_PARAM_KEY

 TOKEN_SECRET_PARAM_KEY = 'oauth_token_secret'

Details

value
oauth_token_secret

TOKEN_PARAM_CALLBACK_CONFIRMED

 TOKEN_PARAM_CALLBACK_CONFIRMED = 'oauth_callback_confirmed'

Details

value
oauth_callback_confirmed

Properties

$_httpUtility

Zend_Oauth_Http_Utility $_httpUtility = 'null'

Details

$_httpUtility
Zend_Oauth_Http_Utility
visibility
protected
default
null
final
false
static
false

$_params

array $_params = 'array'

Token parameters

Details

$_params
array
visibility
protected
default
array
final
false
static
false

$_response

Zend_Http_Response $_response = 'null'

OAuth response object

Details

$_response
Zend_Http_Response
visibility
protected
default
null
final
false
static
false

Methods

__construct

__construct( null|Zend_Http_Response $response = null, null|Zend_Oauth_Http_Utility $utility = null ) : void

Constructor; basic setup for any Token subclass.

Arguments
$response
nullZend_Http_Response
$utility
nullZend_Oauth_Http_Utility
Details
visibility
public
final
false
static
false

__get

__get(  $key ) : string

Generic accessor to enable access as public properties.

Arguments
$key
Output
string
Details
visibility
public
final
false
static
false

__set

__set( string $key, string $value ) : void

Generic mutator to enable access as public properties.

Arguments
$key
string
$value
string
Details
visibility
public
final
false
static
false

__sleep

__sleep( ) :

Limit serialisation stored data to the parameters

Details
visibility
public
final
false
static
false

__toString

__toString( ) : string

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

Aliases to self::toString()

Output
string
Details
visibility
public
final
false
static
false

__wakeup

__wakeup( ) :

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

Details
visibility
public
final
false
static
false

_parseParameters

_parseParameters( Zend_Http_Response $response ) : array

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

Arguments
$response
Zend_Http_Response
Output
array
Details
visibility
protected
final
false
static
false

getParam

getParam( string $key ) : mixed

Get the value for a parameter (e.g. token secret or other).

Arguments
$key
string
Output
mixed
Details
visibility
public
final
false
static
false

getResponse

getResponse( ) : Zend_Http_Response

Return the HTTP response object used to initialise this instance.

Details
visibility
public
final
false
static
false

getToken

getToken( ) : string

Gets the value for a Token.

Output
string
Details
visibility
public
final
false
static
false

getTokenSecret

getTokenSecret( ) : string

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

Output
string
Details
visibility
public
final
false
static
false

isValid

isValid( ) : bool

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

Output
bool
Details
visibility
public
final
false
static
false

setParam

setParam( string $key, string $value ) : Zend_Oauth_Token

Sets the value for a parameter (e.g. token secret or other) and run a simple filter to remove any trailing newlines.

Arguments
$key
string
$value
string
Details
visibility
public
final
false
static
false

setParams

setParams( array $params ) : Zend_Oauth_Token

Sets the value for some parameters (e.g. token secret or other) and run a simple filter to remove any trailing newlines.

Arguments
$params
array
Details
visibility
public
final
false
static
false

setToken

setToken( string $token ) : Zend_Oauth_Token

Sets the value for a Token.

Arguments
$token
string
Details
visibility
public
final
false
static
false

setTokenSecret

setTokenSecret( string $secret ) : Zend_Oauth_Token

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

Arguments
$secret
string
Details
visibility
public
final
false
static
false

toString

toString( ) : string

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

Output
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.