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
array $_connected_to = 'array'
What host/port are we connected to?
resource|null $_curl = 'null'
The curl session handle
array $_invalidOverwritableCurlOptions = ''
List of cURL options that should never be overwritten
string $_response = 'null'
Response gotten from server
resource $out_stream = ''
Stream for storing output
__construct(
)
:
void
Adapter constructor
Config is set using setConfig()
close(
)
:
Close the connection to the server
connect(
string $host, int $port
=
80, boolean $secure
=
false
)
:
void
Initialize curl
getConfig(
)
:
array
Retrieve the array of all configuration options
getHandle(
)
:
resource
Get cUrl Handle
read(
)
:
string
Return read response from server
readHeader(
resource $curl, string $header
)
:
int
Header reader function for CURL
setConfig(
Zend_Config $config
=
array
)
:
Zend_Http_Client_Adapter_Curl
Set the configuration array for the adapter
setCurlOption(
string|int $option, mixed $value
)
:
Zend_Http_Adapter_Curl
Direct setter for cURL adapter related options.
setOutputStream(
resource $stream
)
:
Zend_Http_Client_Adapter_Socket
Set output stream for the response
write(
string $method, Zend_Uri_Http $uri, $httpVersion
=
1.1, array $headers
=
array, string $body
)
:
string
Send request to the remote server