## Zend_Gdata_HttpClient

Description

Gdata Http Client object.

Class to extend the generic Zend Http Client with the ability to perform secure AuthSub requests

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

Located in /Gdata/HttpClient.php (line 40)

    Zend_Http_Client
       |
       --Zend_Gdata_HttpClient

Variable Summary
bool $_streamingRequest
Method Summary
array filterHttpRequest (string $method, string $url, [array $headers = array()], [string $body = null], [string $contentType = null])
Zend_Http_Response filterHttpResponse (Zend_Http_Response $response)
Zend_Http_Client_Adapter_Interface|string getAdapter ()
string getAuthSubPrivateKeyId ()
string getAuthSubToken ()
string getClientLoginToken ()
boolean getStreamingRequest ()
Zend_Http_Client resetParameters ([ $clearAll = false])
void setAdapter (Zend_Http_Client_Adapter_Interface $adapter)
Zend_Gdata_HttpClient setAuthSubPrivateKey (string $key, [string $passphrase = null])
void setAuthSubPrivateKeyFile (string $file, [string $passphrase = null], [bool $useIncludePath = false])
Zend_Gdata_HttpClient setAuthSubToken (string $token)
Zend_Gdata_HttpClient setClientLoginToken (string $token)
Zend_Http_Client setRawDataStream (string $data, [string $enctype = null])
void setStreamingRequest (boolean $value)
string _prepareBody ()
Variables
bool $_streamingRequest = null (line 83)

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
filterHttpRequest (line 207)

Filters the HTTP requests being sent to add the Authorization header.

If both AuthSub and ClientLogin tokens are set, AuthSub takes precedence. If an AuthSub key is set, then secure AuthSub authentication is used, and the request is signed. Requests must be signed only with the private key corresponding to the public key registered with Google. If an AuthSub key is set, but openssl support is not enabled in the PHP installation, an exception is thrown.

- return: The processed values in an associative array, using the same names as the params
- throws: Zend_Gdata_App_Exception if there was a signing failure
- access: public

array filterHttpRequest (string $method, string $url, [array $headers = array()], [string $body = null], [string $contentType = null])

- string $method: The HTTP method
- string $url: The URL
- array $headers: An associate array of headers to be sent with the request or null
- string $body: The body of the request or null
- string $contentType: The MIME content type of the body or null

filterHttpResponse (line 250)

Method for filtering the HTTP response, though no filtering is currently done.

- return: The filterd response object
- access: public

Zend_Http_Response filterHttpResponse (Zend_Http_Response $response)

- Zend_Http_Response $response: The response object to filter

getAdapter (line 259)

Return the current connection adapter

- access: public

Zend_Http_Client_Adapter_Interface|string getAdapter ()

Redefinition of:

Zend_Http_Client::getAdapter()
  Load the connection adapter

getAuthSubPrivateKeyId (line 142)

Gets the openssl private key id

- return: The private key
- access: public

string getAuthSubPrivateKeyId ()
getAuthSubToken (line 151)

Gets the AuthSub token used for authentication

- return: The token
- access: public

string getAuthSubToken ()
getClientLoginToken (line 171)

Gets the ClientLogin token used for authentication

- return: The token
- access: public

string getClientLoginToken ()
getStreamingRequest (line 296)

Check whether the client is set to perform streaming requests.

- return: True if yes, false otherwise.
- access: public

boolean getStreamingRequest ()
resetParameters (line 328)

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 270)

Load the connection adapter

- access: public

void setAdapter (Zend_Http_Client_Adapter_Interface $adapter)

- Zend_Http_Client_Adapter_Interface $adapter

Redefinition of:

Zend_Http_Client::setAdapter()
  Load the connection adapter

setAuthSubPrivateKey (line 125)

Sets the PEM formatted private key to be used for secure AuthSub auth.

In order to call this method, openssl must be enabled in your PHP installation. Otherwise, a Zend_Gdata_App_InvalidArgumentException will be thrown.

- return: Provides a fluent interface
- throws: Zend_Gdata_App_InvalidArgumentException
- access: public

Zend_Gdata_HttpClient setAuthSubPrivateKey (string $key, [string $passphrase = null])

- string $key: The private key
- string $passphrase: The optional private key passphrase

setAuthSubPrivateKeyFile (line 97)

Sets the PEM formatted private key, as read from a file.

This method reads the file and then calls setAuthSubPrivateKey() with the file contents.

- access: public

void setAuthSubPrivateKeyFile (string $file, [string $passphrase = null], [bool $useIncludePath = false])

- string $file: The location of the file containing the PEM key
- string $passphrase: The optional private key passphrase
- bool $useIncludePath: Whether to search the include_path for the file

setAuthSubToken (line 161)

Sets the AuthSub token used for authentication

- return: Provides a fluent interface
- access: public

Zend_Gdata_HttpClient setAuthSubToken (string $token)

- string $token: The token

setClientLoginToken (line 181)

Sets the ClientLogin token used for authentication

- return: Provides a fluent interface
- access: public

Zend_Gdata_HttpClient setClientLoginToken (string $token)

- string $token: The token

setRawDataStream (line 346)

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 286)

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.

_prepareBody (line 311)

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)

#### 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

#### Inherited Constants

Inherited from Zend_Http_Client

> Zend_Http_Client::AUTH_BASIC
> Zend_Http_Client::CONNECT
> Zend_Http_Client::CONTENT_LENGTH
> Zend_Http_Client::CONTENT_TYPE
> Zend_Http_Client::DELETE
> Zend_Http_Client::ENC_FORMDATA
> Zend_Http_Client::ENC_URLENCODED
> Zend_Http_Client::GET
> Zend_Http_Client::HEAD
> Zend_Http_Client::HTTP_0
> Zend_Http_Client::HTTP_1
> Zend_Http_Client::MERGE
> Zend_Http_Client::OPTIONS
> Zend_Http_Client::POST
> Zend_Http_Client::PUT
> Zend_Http_Client::TRACE

Documentation generated on Tue, 26 Oct 2010 20:08:49 +0400 by phpDocumentor 1.4.2