Class Horde_Http_Client_Mock

Description

Located in /Http_Client/lib/Horde/Http/Client/Mock.php (line 17)

Horde_Http_Client
   |
   --Horde_Http_Client_Mock
Variable Summary
Method Summary
 void addResponse (string $response)
 Horde_Http_Client_Response request (string $method, [string $uri = null], [mixed $data = null], [array $headers = array()])
 void setResponseIndex (integer $index)
Variables
integer $_responseIndex = 0 (line 29)

Current mock response

  • access: protected
array $_responses = array() (line 23)

Array of mock responses

  • access: protected

Inherited Variables

Inherited from Horde_Http_Client

Horde_Http_Client::$_headers
Horde_Http_Client::$_lastRequest
Horde_Http_Client::$_lastResponse
Horde_Http_Client::$_proxyPass
Horde_Http_Client::$_proxyServer
Horde_Http_Client::$_proxyUser
Horde_Http_Client::$_uri
Methods
addResponse (line 70)

Add another response to the response buffer.

  • access: public
void addResponse (string $response)
  • string $response
request (line 46)

Send an HTTP request

  • TODO: make lastRequest work somehow.
  • access: public
Horde_Http_Client_Response request (string $method, [string $uri = null], [mixed $data = null], [array $headers = array()])
  • string $method: HTTP request method (GET, PUT, etc.)
  • string $uri: URI to request, if different from $this->uri
  • mixed $data: Request data. Can be an array of form data that will be encoded automatically, or a raw string.
  • array $headers: Any headers specific to this request. They will be combined with $this->_headers, and override headers of the same name for this request only.

Redefinition of:
Horde_Http_Client::request()
Send an HTTP request
setResponse (line 59)

Set the HTTP response(s) to be returned by this adapter

  • access: public
void setResponse (Horde_Http_Client_Response $response)
setResponseIndex (line 81)

Sets the position of the response buffer. Selects which response will be returned on the next call to read().

  • access: public
void setResponseIndex (integer $index)
  • integer $index

Inherited Methods

Inherited From Horde_Http_Client

 Horde_Http_Client::__construct()
 Horde_Http_Client::delete()
 Horde_Http_Client::get()
 Horde_Http_Client::getHeader()
 Horde_Http_Client::post()
 Horde_Http_Client::put()
 Horde_Http_Client::request()
 Horde_Http_Client::setHeaders()
 Horde_Http_Client::__get()
 Horde_Http_Client::__set()

Documentation generated on Sun, 30 Jan 2011 05:19:43 +0000 by phpDocumentor 1.4.3