Http/Client/Adapter/Curl.php
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.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Http
- Subpackage
- Client_Adapter
- Version
- $Id: Curl.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Http_Client_Adapter_Curl
Package: Zend\Http\Client\AdapterAn 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
- Implements
- \Zend_Http_Client_Adapter_Interface
- \Zend_Http_Client_Adapter_Stream
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties



array $_connected_to = array(null, null)What host/port are we connected to?
Default valuearray(null, null)Details- Type
- array



string $_response = nullResponse gotten from server
Default valuenullDetails- Type
- string
Methods



readHeader(resource $curl, string $header) : intHeader reader function for CURL
Parameters| Name | Type | Description |
|---|
| $curl | resource | |
|---|
| $header | string | |
|---|
Returns 


setConfig(\Zend_Config $config = array()) : \Zend_Http_Client_Adapter_CurlSet the configuration array for the adapter
Parameters| Name | Type | Description |
|---|
| $config | \Zend_Config | | array $config
|
|---|
ReturnsThrows 


setCurlOption(string | int $option, mixed $value) : \Zend_Http_Adapter_CurlDirect setter for cURL adapter related options.
Parameters| Name | Type | Description |
|---|
| $option | string | int | |
|---|
| $value | mixed | |
|---|
Returns| Type | Description |
|---|
| \Zend_Http_Adapter_Curl | |



setOutputStream(resource $stream) : \Zend_Http_Client_Adapter_SocketSet output stream for the response
This function sets output stream where the result will be stored.
Parameters| Name | Type | Description |
|---|
| $stream | resource | |
|---|
Returns


write(string $method, \Zend_Uri_Http $uri, $httpVersion = 1.1, array $headers = array(), string $body = '') : stringSend request to the remote server
Parameters| Name | Type | Description |
|---|
| $method | string | |
|---|
| $uri | \Zend_Uri_Http | |
|---|
| $httpVersion | | |
|---|
| $headers | array | |
|---|
| $body | string | |
|---|
Returns| Type | Description |
|---|
| string | $request |
Throws