## Zend_Http_Client_Adapter_Curl

Description

Implements interfaces:

- Zend_Http_Client_Adapter_Interface
- Zend_Http_Client_Adapter_Stream

An adapter class for Zend_Http_Client based on the curl extension.

Curl requires libcurl. See for full requirements the PHP manual: http://php.net/curl

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

Located in /Http/Client/Adapter/Curl.php (line 48)

Variable Summary
resource $out_stream
array $_config
array $_connected_to
resource|null $_curl
array $_invalidOverwritableCurlOptions
string $_response
Method Summary
void __construct ()
void close ()
void connect (string $host, [int $port = 80], [boolean $secure = false])
array getConfig ()
resource getHandle ()
string read ()
int readHeader (resource $curl, string $header)
Zend_Http_Client_Adapter_Curl setConfig ([Zend_Config $config = array()])
Zend_Http_Adapter_Curl setCurlOption (string|int $option, mixed $value)
Zend_Http_Client_Adapter_Socket setOutputStream (resource $stream)
string write (string $method, Zend_Uri_Http $uri, [ $httpVersion = 1.1], [array $headers = array()], [string $body = ''], float $http_ver)
Variables
resource $out_stream (line 90)

Stream for storing output

- access: protected

array $_config = array() (line 55)

Parameters array

- access: protected

array $_connected_to = array(null, null) (line 62)

What host/port are we connected to?

- access: protected

resource|null $_curl = null (line 69)

The curl session handle

- access: protected

array $_invalidOverwritableCurlOptions (line 76)

List of cURL options that should never be overwritten

- access: protected

string $_response = null (line 83)

Response gotten from server

- access: protected

Methods
Constructor __construct (line 100)

Adapter constructor

Config is set using setConfig()

- throws: Zend_Http_Client_Adapter_Exception
- access: public

void __construct ()
close (line 464)

Close the connection to the server

- access: public

void close ()

Implementation of:

Zend_Http_Client_Adapter_Interface::close()
  Close the connection to the server

connect (line 202)

Initialize curl

- throws: Zend_Http_Client_Adapter_Exception if unable to connect
- access: public

void connect (string $host, [int $port = 80], [boolean $secure = false])

- string $host
- int $port
- boolean $secure

Implementation of:

Zend_Http_Client_Adapter_Interface::connect()
  Connect to the remote server

getConfig (line 172)

Retrieve the array of all configuration options

- access: public

array getConfig ()
getHandle (line 478)

Get cUrl Handle

- access: public

resource getHandle ()
read (line 455)

Return read response from server

- access: public

string read ()

Implementation of:

Zend_Http_Client_Adapter_Interface::read()
  Read response from server

readHeader (line 502)

Header reader function for CURL

- access: public

int readHeader (resource $curl, string $header)

- resource $curl
- string $header

setConfig (line 132)

Set the configuration array for the adapter

- throws: Zend_Http_Client_Adapter_Exception
- access: public

Zend_Http_Client_Adapter_Curl setConfig ([Zend_Config $config = array()])

- Zend_Config $config: | array $config

Implementation of:

Zend_Http_Client_Adapter_Interface::setConfig()
  Set the configuration array for the adapter

setCurlOption (line 184)

Direct setter for cURL adapter related options.

- access: public

Zend_Http_Adapter_Curl setCurlOption (string|int $option, mixed $value)

- string|int $option
- mixed $value

setOutputStream (line 489)

Set output stream for the response

- access: public

Zend_Http_Client_Adapter_Socket setOutputStream (resource $stream)

- resource $stream

Implementation of:

Zend_Http_Client_Adapter_Stream::setOutputStream()
  Set output stream

write (line 262)

Send request to the remote server

- throws: Zend_Http_Client_Adapter_Exception If connection fails, connected to wrong host, no PUT file defined, unsupported method, or unsupported cURL option
- access: public

string write (string $method, Zend_Uri_Http $uri, [ $httpVersion = 1.1], [array $headers = array()], [string $body = ''], float $http_ver)

- string $method
- Zend_Uri_Http $uri
- float $http_ver
- array $headers
- string $body
- $httpVersion

Implementation of:

Zend_Http_Client_Adapter_Interface::write()
  Send request to the remote server

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