API Documentation

Zend/Oauth/Token.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Oauth  
Version
$Id: Token.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Oauth_Token

Package: Zend\Oauth

Children
\Zend_Oauth_Token_AuthorizedRequest
\Zend_Oauth_Token_Request
\Zend_Oauth_Token_Access
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  TOKEN_PARAM_KEY = 'oauth_token'
Constant  TOKEN_SECRET_PARAM_KEY = 'oauth_token_secret'
Constant  TOKEN_PARAM_CALLBACK_CONFIRMED = 'oauth_callback_confirmed'

Properties

Propertyprotected\Zend_Oauth_Http_Utility  $_httpUtility= 'null'

Default valuenullDetails
Type
\Zend_Oauth_Http_Utility
Propertyprotectedarray  $_params= 'array()'

Token parameters

Default valuearray()Details
Type
array
Propertyprotected\Zend_Http_Response  $_response= 'null'

OAuth response object

Default valuenullDetails
Type
\Zend_Http_Response

Methods

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

Constructor; basic setup for any Token subclass.

Parameters
Name Type Description
$response null|\Zend_Http_Response
$utility null|\Zend_Oauth_Http_Utility
methodpublic__get(  $key ) : string

Generic accessor to enable access as public properties.

Parameters
Name Type Description
$key
Returns
Type Description
string
methodpublic__set( string $key, string $value ) : void

Generic mutator to enable access as public properties.

Parameters
Name Type Description
$key string
$value string
methodpublic__sleep( ) : void

Limit serialisation stored data to the parameters

methodpublic__toString( ) : string

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

Aliases to self::toString()

Returns
Type Description
string
methodpublic__wakeup( ) : void

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

methodprotected_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.

Parameters
Name Type Description
$response \Zend_Http_Response
Returns
Type Description
array
methodpublicgetParam( string $key ) : mixed

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

Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetResponse( ) : \Zend_Http_Response

Return the HTTP response object used to initialise this instance.

Returns
Type Description
\Zend_Http_Response
methodpublicgetToken( ) : string

Gets the value for a Token.

Returns
Type Description
string
methodpublicgetTokenSecret( ) : string

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

Returns
Type Description
string
methodpublicisValid( ) : bool

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

Returns
Type Description
bool
methodpublicsetParam( 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.

Parameters
Name Type Description
$key string
$value string
Returns
Type Description
\Zend_Oauth_Token
methodpublicsetParams( 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.

Parameters
Name Type Description
$params array
Returns
Type Description
\Zend_Oauth_Token
methodpublicsetToken( string $token ) : \Zend_Oauth_Token

Sets the value for a Token.

Parameters
Name Type Description
$token string
Returns
Type Description
\Zend_Oauth_Token
methodpublicsetTokenSecret( string $secret ) : \Zend_Oauth_Token

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

Parameters
Name Type Description
$secret string
Returns
Type Description
\Zend_Oauth_Token
methodpublictoString( ) : string

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

Returns
Type Description
string
Documentation was generated by DocBlox 0.15.1.