[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/zend/Zend/Gdata/ -> HttpClient.php (summary)

Zend Framework LICENSE

Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: http://framework.zend.com/license/new-bsd New BSD License
Version: $Id$
File Size: 352 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Zend_Gdata_HttpClient:: (16 methods):
  setAuthSubPrivateKeyFile()
  setAuthSubPrivateKey()
  getAuthSubPrivateKeyId()
  getAuthSubToken()
  setAuthSubToken()
  getClientLoginToken()
  setClientLoginToken()
  filterHttpRequest()
  filterHttpResponse()
  getAdapter()
  setAdapter()
  setStreamingRequest()
  getStreamingRequest()
  _prepareBody()
  resetParameters()
  setRawDataStream()


Class: Zend_Gdata_HttpClient  - X-Ref

Gdata Http Client object.

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

setAuthSubPrivateKeyFile($file, $passphrase = null,$useIncludePath = false)   X-Ref
Sets the PEM formatted private key, as read from a file.

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

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

setAuthSubPrivateKey($key, $passphrase = null)   X-Ref
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.

param: string $key The private key
param: string $passphrase The optional private key passphrase
return: Zend_Gdata_HttpClient Provides a fluent interface

getAuthSubPrivateKeyId()   X-Ref
Gets the openssl private key id

return: string The private key

getAuthSubToken()   X-Ref
Gets the AuthSub token used for authentication

return: string The token

setAuthSubToken($token)   X-Ref
Sets the AuthSub token used for authentication

param: string $token The token
return: Zend_Gdata_HttpClient Provides a fluent interface

getClientLoginToken()   X-Ref
Gets the ClientLogin token used for authentication

return: string The token

setClientLoginToken($token)   X-Ref
Sets the ClientLogin token used for authentication

param: string $token The token
return: Zend_Gdata_HttpClient Provides a fluent interface

filterHttpRequest($method, $url, $headers = array()   X-Ref
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.

param: string $method The HTTP method
param: string $url The URL
param: array $headers An associate array of headers to be
param: string $body The body of the request or null
param: string $contentType The MIME content type of the body or null
return: array The processed values in an associative array,

filterHttpResponse($response)   X-Ref
Method for filtering the HTTP response, though no filtering is
currently done.

param: Zend_Http_Response $response The response object to filter
return: Zend_Http_Response The filterd response object

getAdapter()   X-Ref
Return the current connection adapter

return: Zend_Http_Client_Adapter_Interface|string $adapter

setAdapter($adapter)   X-Ref
Load the connection adapter

param: Zend_Http_Client_Adapter_Interface $adapter
return: void

setStreamingRequest($value)   X-Ref
Set the streamingRequest variable which controls whether we are
sending the raw (already encoded) POST data from a stream source.

param: boolean $value The value to set.
return: void

getStreamingRequest()   X-Ref
Check whether the client is set to perform streaming requests.

return: boolean True if yes, false otherwise.

_prepareBody()   X-Ref
Prepare the request body (for POST and PUT requests)

return: string

resetParameters($clearAll = false)   X-Ref
Clear all custom parameters we set.

return: Zend_Http_Client

setRawDataStream($data, $enctype = null)   X-Ref
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().

param: string $data The request data
param: string $enctype The encoding type
return: Zend_Http_Client



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1