Definition at line 36 of file Curl.php.
HTTP_Request2_Adapter_Curl::callbackReadBody |
( |
|
$ch, |
|
|
|
$fd, |
|
|
|
$length |
|
) |
| |
|
protected |
Callback function called by cURL for reading the request body
- Parameters
-
resource | $ch | cURL handle |
resource | $fd | file descriptor (not used) |
integer | $length | maximum length of data to return |
- Returns
- string part of the request body, up to $length bytes
Definition at line 436 of file Curl.php.
HTTP_Request2_Adapter_Curl::callbackWriteBody |
( |
|
$ch, |
|
|
|
$string |
|
) |
| |
|
protected |
Callback function called by cURL for saving the response body
- Parameters
-
resource | $ch | cURL handle (not used) |
string | $string | part of the response body |
- Returns
- integer number of bytes saved
- Exceptions
-
- See Also
- HTTP_Request2_Response::appendBody()
Definition at line 550 of file Curl.php.
HTTP_Request2_Adapter_Curl::callbackWriteHeader |
( |
|
$ch, |
|
|
|
$string |
|
) |
| |
|
protected |
Callback function called by cURL for saving the response headers
- Parameters
-
resource | $ch | cURL handle |
string | $string | response header (with trailing CRLF) |
- Returns
- integer number of bytes saved
- See Also
- HTTP_Request2_Response::parseHeaderLine()
Definition at line 470 of file Curl.php.
HTTP_Request2_Adapter_Curl::createCurlHandle |
( |
| ) |
|
|
protected |
Creates a new cURL handle and populates it with data from the request
- Returns
- resource a cURL handle, as created by curl_init()
- Exceptions
-
Definition at line 220 of file Curl.php.
HTTP_Request2_Adapter_Curl::getInfo |
( |
| ) |
|
Returns information about last transfer
- Returns
- array associative array as returned by curl_getinfo()
Definition at line 208 of file Curl.php.
HTTP_Request2_Adapter_Curl::sendRequest |
( |
HTTP_Request2 |
$request | ) |
|
HTTP_Request2_Adapter_Curl::workaroundPhpBug47204 |
( |
|
$ch, |
|
|
& |
$headers |
|
) |
| |
|
protected |
Workaround for PHP bug #47204 that prevents rewinding request body
The workaround consists of reading the entire request body into memory and setting it as CURLOPT_POSTFIELDS, so it isn't recommended for large file uploads, use Socket adapter instead.
- Parameters
-
resource | $ch | cURL handle |
array | &$headers | Request headers |
Definition at line 400 of file Curl.php.
static HTTP_Request2_Adapter_Curl::wrapCurlError |
( |
|
$ch | ) |
|
|
staticprotected |
HTTP_Request2_Adapter_Curl::$errorMap |
|
staticprotected |
HTTP_Request2_Adapter_Curl::$eventReceivedHeaders = false |
|
protected |
HTTP_Request2_Adapter_Curl::$eventSentHeaders = false |
|
protected |
HTTP_Request2_Adapter_Curl::$headerMap |
|
staticprotected |
Initial value:= array(
'accept-encoding' => CURLOPT_ENCODING,
'cookie' => CURLOPT_COOKIE,
'referer' => CURLOPT_REFERER,
'user-agent' => CURLOPT_USERAGENT
)
Definition at line 42 of file Curl.php.
HTTP_Request2_Adapter_Curl::$lastInfo |
|
protected |
HTTP_Request2_Adapter_Curl::$position = 0 |
|
protected |
HTTP_Request2_Adapter_Curl::$response |
|
protected |
HTTP_Request2_Adapter_Curl::$sslContextMap |
|
staticprotected |
Initial value:= array(
'ssl_verify_peer' => CURLOPT_SSL_VERIFYPEER,
'ssl_cafile' => CURLOPT_CAINFO,
'ssl_capath' => CURLOPT_CAPATH,
'ssl_local_cert' => CURLOPT_SSLCERT,
'ssl_passphrase' => CURLOPT_SSLCERTPASSWD
)
Definition at line 53 of file Curl.php.
The documentation for this class was generated from the following file:
- libs/PEAR.1.9.5/HTTP/Request2/Adapter/Curl.php