Oauth/Token.php

Show: PublicProtectedPrivateinherited
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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Oauth  
Version
$Id$  

\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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  TOKEN_PARAM_KEY = 'oauth_token'
>VConstant  TOKEN_SECRET_PARAM_KEY = 'oauth_token_secret'
>VConstant  TOKEN_PARAM_CALLBACK_CONFIRMED = 'oauth_callback_confirmed'

Properties

>VPropertyprotected\Zend_Oauth_Http_Utility $_httpUtility = null
Default valuenullDetails
Type
\Zend_Oauth_Http_Utility
>VPropertyprotectedarray $_params = array()
Token parameters
Default valuearray()Details
Type
array
>VPropertyprotected\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
NameTypeDescription
$responsenull | \Zend_Http_Response
$utilitynull | \Zend_Oauth_Http_Utility
methodpublic__get( $key) : string

Generic accessor to enable access as public properties.

Parameters
NameTypeDescription
$key
Returns
TypeDescription
string
methodpublic__set(string $key, string $value) : void

Generic mutator to enable access as public properties.

Parameters
NameTypeDescription
$keystring
$valuestring
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
TypeDescription
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
NameTypeDescription
$response\Zend_Http_Response
Returns
TypeDescription
array
methodpublicgetParam(string $key) : mixed

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

Parameters
NameTypeDescription
$keystring
Returns
TypeDescription
mixed
methodpublicgetResponse() : \Zend_Http_Response

Return the HTTP response object used to initialise this instance.

Returns
TypeDescription
\Zend_Http_Response
methodpublicgetToken() : string

Gets the value for a Token.

Returns
TypeDescription
string
methodpublicgetTokenSecret() : string

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

Returns
TypeDescription
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
TypeDescription
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
NameTypeDescription
$keystring
$valuestring
Returns
TypeDescription
\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
NameTypeDescription
$paramsarray
Returns
TypeDescription
\Zend_Oauth_Token
methodpublicsetToken(string $token) : \Zend_Oauth_Token

Sets the value for a Token.

Parameters
NameTypeDescription
$tokenstring
Returns
TypeDescription
\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
NameTypeDescription
$secretstring
Returns
TypeDescription
\Zend_Oauth_Token
methodpublictoString() : string

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

Returns
TypeDescription
string
Documentation was generated by phpDocumentor 2.2.0 .