Moodle  2.2.1
http://www.collinsharper.com
Zend_Gdata_HttpClient Class Reference
Inheritance diagram for Zend_Gdata_HttpClient:
Collaboration diagram for Zend_Gdata_HttpClient:

Public Member Functions

 setAuthSubPrivateKeyFile ($file, $passphrase=null, $useIncludePath=false)
 setAuthSubPrivateKey ($key, $passphrase=null)
 getAuthSubPrivateKeyId ()
 getAuthSubToken ()
 setAuthSubToken ($token)
 getClientLoginToken ()
 setClientLoginToken ($token)
 filterHttpRequest ($method, $url, $headers=array(), $body=null, $contentType=null)
 filterHttpResponse ($response)
 getAdapter ()
 setAdapter ($adapter)
 setStreamingRequest ($value)
 getStreamingRequest ()
 resetParameters ($clearAll=false)
 setRawDataStream ($data, $enctype=null)

Protected Member Functions

 _prepareBody ()

Protected Attributes

 $_streamingRequest = null

Detailed Description

Definition at line 40 of file HttpClient.php.


Member Function Documentation

_prepareBody ( ) [protected]

Prepare the request body (for POST and PUT requests)

Returns:
string
Exceptions:
Zend_Http_Client_Exception

Reimplemented from Zend_Http_Client.

Definition at line 311 of file HttpClient.php.

Here is the call graph for this function:

filterHttpRequest ( method,
url,
headers = array(),
body = null,
contentType = null 
)

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.

Parameters:
string$methodThe HTTP method
string$urlThe URL
array$headersAn associate array of headers to be sent with the request or null
string$bodyThe body of the request or null
string$contentTypeThe MIME content type of the body or null
Exceptions:
Zend_Gdata_App_Exceptionif there was a signing failure
Returns:
array The processed values in an associative array, using the same names as the params

Definition at line 207 of file HttpClient.php.

Here is the call graph for this function:

filterHttpResponse ( response)

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

Parameters:
Zend_Http_Response$responseThe response object to filter
Returns:
Zend_Http_Response The filterd response object

Definition at line 250 of file HttpClient.php.

Return the current connection adapter

Returns:
Zend_Http_Client_Adapter_Interface|string $adapter

Reimplemented from Zend_Http_Client.

Definition at line 259 of file HttpClient.php.

Gets the openssl private key id

Returns:
string The private key

Definition at line 142 of file HttpClient.php.

Here is the caller graph for this function:

Gets the AuthSub token used for authentication

Returns:
string The token

Definition at line 151 of file HttpClient.php.

Here is the caller graph for this function:

Gets the ClientLogin token used for authentication

Returns:
string The token

Definition at line 171 of file HttpClient.php.

Here is the caller graph for this function:

Check whether the client is set to perform streaming requests.

Returns:
boolean True if yes, false otherwise.

Definition at line 296 of file HttpClient.php.

resetParameters ( clearAll = false)

Clear all custom parameters we set.

Returns:
Zend_Http_Client

Reimplemented from Zend_Http_Client.

Definition at line 328 of file HttpClient.php.

setAdapter ( adapter)

Load the connection adapter

Parameters:
Zend_Http_Client_Adapter_Interface$adapter
Returns:
void

Reimplemented from Zend_Http_Client.

Definition at line 270 of file HttpClient.php.

setAuthSubPrivateKey ( key,
passphrase = null 
)

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.

Parameters:
string$keyThe private key
string$passphraseThe optional private key passphrase
Exceptions:
Zend_Gdata_App_InvalidArgumentException
Returns:
Zend_Gdata_HttpClient Provides a fluent interface

Definition at line 125 of file HttpClient.php.

Here is the caller graph for this function:

setAuthSubPrivateKeyFile ( file,
passphrase = null,
useIncludePath = false 
)

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

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

Parameters:
string$fileThe location of the file containing the PEM key
string$passphraseThe optional private key passphrase
bool$useIncludePathWhether to search the include_path for the file
Returns:
void

Definition at line 97 of file HttpClient.php.

Here is the call graph for this function:

setAuthSubToken ( token)

Sets the AuthSub token used for authentication

Parameters:
string$tokenThe token
Returns:
Zend_Gdata_HttpClient Provides a fluent interface

Definition at line 161 of file HttpClient.php.

setClientLoginToken ( token)

Sets the ClientLogin token used for authentication

Parameters:
string$tokenThe token
Returns:
Zend_Gdata_HttpClient Provides a fluent interface

Definition at line 181 of file HttpClient.php.

setRawDataStream ( data,
enctype = null 
)

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().

Parameters:
string$dataThe request data
string$enctypeThe encoding type
Returns:
Zend_Http_Client

Definition at line 346 of file HttpClient.php.

Here is the call graph for this function:

setStreamingRequest ( value)

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

Parameters:
boolean$valueThe value to set.
Returns:
void

Definition at line 286 of file HttpClient.php.


Field Documentation

$_streamingRequest = null [protected]

Definition at line 83 of file HttpClient.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations