Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
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
array $_config = 'array'Parameters array
Detailsarray $_connected_to = 'array'What host/port are we connected to?
Detailsresource|null $_curl = 'null'The curl session handle
Detailsarray $_invalidOverwritableCurlOptions = ''List of cURL options that should never be overwritten
Detailsstring $_response = 'null'Response gotten from server
Detailsresource $out_stream = ''Stream for storing output
Details__construct(
)
:
voidAdapter constructor
Config is set using setConfig()
Detailsclose(
)
:
Close the connection to the server
Detailsconnect(
string $host, int $port
=
80, boolean $secure
=
false
)
:
voidInitialize curl
DetailsgetConfig(
)
:
arrayRetrieve the array of all configuration options
DetailsgetHandle(
)
:
resourceGet cUrl Handle
Detailsread(
)
:
stringReturn read response from server
DetailsreadHeader(
resource $curl, string $header
)
:
intHeader reader function for CURL
DetailssetConfig(
Zend_Config $config
=
array
)
:
Zend_Http_Client_Adapter_CurlSet the configuration array for the adapter
DetailssetCurlOption(
string|int $option, mixed $value
)
:
Zend_Http_Adapter_CurlDirect setter for cURL adapter related options.
DetailssetOutputStream(
resource $stream
)
:
Zend_Http_Client_Adapter_SocketSet output stream for the response
Detailswrite(
string $method, Zend_Uri_Http $uri, $httpVersion
=
1.1, array $headers
=
array, string $body
)
:
stringSend request to the remote server
Details