Class Zend_Oauth_Client

Description
  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Oauth/Client.php (line 40)

Zend_Http_Client
   |
   --Zend_Oauth_Client
Variable Summary
Method Summary
 void __construct ( $oauthOptions, [string $uri = null], [array|Zend_Config $config = null])
 boolean getStreamingRequest ()
 void prepareOauth ()
 Zend_Http_Response request ([string $method = null])
 Zend_Http_Client resetParameters ([ $clearAll = false])
 Zend_Http_Client setMethod ([string $method = self::GET])
 Zend_Http_Client setRawDataStream (string $data, [string $enctype = null])
 void setStreamingRequest (boolean $value)
 string _prepareBody ()
 mixed __call (string $method,  $args)
Variables
static mixed $supportsRevisionA = false (line 46)

Flag to indicate that the client has detected the server as supporting

OAuth 1.0a

  • access: public
Zend_Oauth_Config $_config = null (line 56)

Holds the current OAuth Configuration set encapsulated in an instance

of Zend_Oauth_Config; it's not a Zend_Config instance since that level of abstraction is unnecessary and doesn't let me escape the accessors and mutators anyway!

  • access: protected
bool $_streamingRequest = null (line 64)

True if this request is being made with data supplied by a stream object instead of a raw encoded string.

  • access: protected

Inherited Variables

Inherited from Zend_Http_Client

Zend_Http_Client::$adapter
Zend_Http_Client::$auth
Zend_Http_Client::$config
Zend_Http_Client::$cookiejar
Zend_Http_Client::$enctype
Zend_Http_Client::$files
Zend_Http_Client::$headers
Zend_Http_Client::$last_request
Zend_Http_Client::$last_response
Zend_Http_Client::$method
Zend_Http_Client::$paramsGet
Zend_Http_Client::$paramsPost
Zend_Http_Client::$raw_post_data
Zend_Http_Client::$redirectCounter
Zend_Http_Client::$uri
Zend_Http_Client::$_fileInfoDb
Methods
Constructor __construct (line 77)

Constructor; creates a new HTTP Client instance which itself is just a typical Zend_Http_Client subclass with some OAuth icing to assist in automating OAuth parameter generation, addition and cryptographioc signing of requests.

  • access: public
void __construct ( $oauthOptions, [string $uri = null], [array|Zend_Config $config = null])
  • array $oauthOptions
  • string $uri
  • array|Zend_Config $config

Redefinition of:
Zend_Http_Client::__construct()
Contructor method. Will create a new HTTP client. Accepts the target URL and optionally configuration array.
getAdapter (line 94)

Return the current connection adapter

  • access: public
Zend_Http_Client_Adapter_Interface|string getAdapter ()

Redefinition of:
Zend_Http_Client::getAdapter()
Load the connection adapter
getStreamingRequest (line 131)

Check whether the client is set to perform streaming requests.

  • return: True if yes, false otherwise.
  • access: public
boolean getStreamingRequest ()
prepareOauth (line 237)

Performs OAuth preparation on the request before sending.

This primarily means taking a request, correctly encoding and signing all parameters, and applying the correct OAuth scheme to the method being used.

  • throws: Zend_Oauth_Exception If POSTBODY scheme requested, but GET request method used; or if invalid request scheme provided
  • access: public
void prepareOauth ()
request (line 218)

Same as Zend_Http_Client::request() except just before the request is executed, we automatically append any necessary OAuth parameters and sign the request using the relevant signature method.

  • access: public
Zend_Http_Response request ([string $method = null])
  • string $method

Redefinition of:
Zend_Http_Client::request()
Send the HTTP request and return an HTTP response object
resetParameters (line 163)

Clear all custom parameters we set.

  • access: public
Zend_Http_Client resetParameters ([ $clearAll = false])
  • $clearAll

Redefinition of:
Zend_Http_Client::resetParameters()
Clear all GET and POST parameters
setAdapter (line 105)

Load the connection adapter

  • access: public
void setAdapter (Zend_Http_Client_Adapter_Interface $adapter)

Redefinition of:
Zend_Http_Client::setAdapter()
Load the connection adapter
setMethod (line 194)

Same as Zend_Http_Client::setMethod() except it also creates an Oauth specific reference to the method type.

Might be defunct and removed in a later iteration.

  • access: public
Zend_Http_Client setMethod ([string $method = self::GET])
  • string $method

Redefinition of:
Zend_Http_Client::setMethod()
Set the next request's method
setRawDataStream (line 180)

Set the raw (already encoded) POST data from a stream source.

This is used to support POSTing from open file handles without caching the entire body into memory. It is a wrapper around Zend_Http_Client::setRawData().

  • access: public
Zend_Http_Client setRawDataStream (string $data, [string $enctype = null])
  • string $data: The request data
  • string $enctype: The encoding type
setStreamingRequest (line 121)

Set the streamingRequest variable which controls whether we are sending the raw (already encoded) POST data from a stream source.

  • access: public
void setStreamingRequest (boolean $value)
  • boolean $value: The value to set.
_getSignableParametersAsQueryString (line 300)

Collect all signable parameters into a single array across query string and POST body. These are returned as a properly formatted single query string.

  • access: protected
string _getSignableParametersAsQueryString ()
_prepareBody (line 146)

Prepare the request body (for POST and PUT requests)

  • throws: Zend_Http_Client_Exception
  • access: protected
string _prepareBody ()

Redefinition of:
Zend_Http_Client::_prepareBody()
Prepare the request body (for POST and PUT requests)
__call (line 328)

Simple Proxy to the current Zend_Oauth_Config method. It's that instance which holds all configuration methods and values this object also presents as it's API.

  • throws: Zend_Oauth_Exception if method does not exist in config object
  • access: public
mixed __call (string $method,  $args)
  • string $method
  • array $args

Inherited Methods

Inherited From Zend_Http_Client

 Zend_Http_Client::__construct()
 Zend_Http_Client::encodeAuthHeader()
 Zend_Http_Client::encodeFormData()
 Zend_Http_Client::getAdapter()
 Zend_Http_Client::getCookieJar()
 Zend_Http_Client::getHeader()
 Zend_Http_Client::getLastRequest()
 Zend_Http_Client::getLastResponse()
 Zend_Http_Client::getRedirectionsCount()
 Zend_Http_Client::getStream()
 Zend_Http_Client::getUri()
 Zend_Http_Client::request()
 Zend_Http_Client::resetParameters()
 Zend_Http_Client::setAdapter()
 Zend_Http_Client::setAuth()
 Zend_Http_Client::setConfig()
 Zend_Http_Client::setCookie()
 Zend_Http_Client::setCookieJar()
 Zend_Http_Client::setEncType()
 Zend_Http_Client::setFileUpload()
 Zend_Http_Client::setHeaders()
 Zend_Http_Client::setMethod()
 Zend_Http_Client::setParameterGet()
 Zend_Http_Client::setParameterPost()
 Zend_Http_Client::setRawData()
 Zend_Http_Client::setStream()
 Zend_Http_Client::setUri()
 Zend_Http_Client::_detectFileMimeType()
 Zend_Http_Client::_flattenParametersArray()
 Zend_Http_Client::_getParametersRecursive()
 Zend_Http_Client::_openTempStream()
 Zend_Http_Client::_prepareBody()
 Zend_Http_Client::_prepareHeaders()
 Zend_Http_Client::_setParameter()
Class Constants

Documentation generated on Mon, 21 Jun 2010 15:12:04 -0400 by phpDocumentor 1.4.3