|
Moodle
2.2.1
http://www.collinsharper.com
|


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 | |
Definition at line 40 of file HttpClient.php.
| _prepareBody | ( | ) | [protected] |
Prepare the request body (for POST and PUT requests)
| Zend_Http_Client_Exception |
Reimplemented from Zend_Http_Client.
Definition at line 311 of file HttpClient.php.

| 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.
| 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 |
| Zend_Gdata_App_Exception | if there was a signing failure |
Definition at line 207 of file HttpClient.php.

| filterHttpResponse | ( | $ | response | ) |
Method for filtering the HTTP response, though no filtering is currently done.
| Zend_Http_Response | $response | The response object to filter |
Definition at line 250 of file HttpClient.php.
| getAdapter | ( | ) |
Return the current connection adapter
Reimplemented from Zend_Http_Client.
Definition at line 259 of file HttpClient.php.
Gets the openssl private key id
Definition at line 142 of file HttpClient.php.

| getAuthSubToken | ( | ) |
Gets the AuthSub token used for authentication
Definition at line 151 of file HttpClient.php.

Gets the ClientLogin token used for authentication
Definition at line 171 of file HttpClient.php.

Check whether the client is set to perform streaming requests.
Definition at line 296 of file HttpClient.php.
| resetParameters | ( | $ | clearAll = false | ) |
Clear all custom parameters we set.
Reimplemented from Zend_Http_Client.
Definition at line 328 of file HttpClient.php.
| setAdapter | ( | $ | adapter | ) |
Load the connection adapter
| Zend_Http_Client_Adapter_Interface | $adapter |
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.
| string | $key | The private key |
| string | $passphrase | The optional private key passphrase |
| Zend_Gdata_App_InvalidArgumentException |
Definition at line 125 of file HttpClient.php.

| 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.
| 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 |
Definition at line 97 of file HttpClient.php.

| setAuthSubToken | ( | $ | token | ) |
Sets the AuthSub token used for authentication
| string | $token | The token |
Definition at line 161 of file HttpClient.php.
| setClientLoginToken | ( | $ | token | ) |
Sets the ClientLogin token used for authentication
| string | $token | The token |
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().
| string | $data | The request data |
| string | $enctype | The encoding type |
Definition at line 346 of file HttpClient.php.

| setStreamingRequest | ( | $ | value | ) |
Set the streamingRequest variable which controls whether we are sending the raw (already encoded) POST data from a stream source.
| boolean | $value | The value to set. |
Definition at line 286 of file HttpClient.php.
$_streamingRequest = null [protected] |
Definition at line 83 of file HttpClient.php.