|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct () | |
| setConfig ($config=array()) | |
| getConfig () | |
| setCurlOption ($option, $value) | |
| connect ($host, $port=80, $secure=false) | |
| write ($method, $uri, $httpVersion=1.1, $headers=array(), $body= '') | |
| read () | |
| close () | |
| getHandle () | |
| setOutputStream ($stream) | |
| readHeader ($curl, $header) | |
Protected Attributes | |
| $_config = array() | |
| $_connected_to = array(null, null) | |
| $_curl = null | |
| $_invalidOverwritableCurlOptions | |
| $_response = null | |
| $out_stream | |
| __construct | ( | ) |
Adapter constructor
Config is set using setConfig()
| Zend_Http_Client_Adapter_Exception |
| close | ( | ) |
Close the connection to the server
Implements Zend_Http_Client_Adapter_Interface.
Definition at line 464 of file Curl.php.

| connect | ( | $ | host, |
| $ | port = 80, |
||
| $ | secure = false |
||
| ) |
Initialize curl
| string | $host | |
| int | $port | |
| boolean | $secure |
| Zend_Http_Client_Adapter_Exception | if unable to connect |
Implements Zend_Http_Client_Adapter_Interface.
Definition at line 202 of file Curl.php.

| getConfig | ( | ) |
| read | ( | ) |
| readHeader | ( | $ | curl, |
| $ | header | ||
| ) |
Set the configuration array for the adapter
| Zend_Http_Client_Adapter_Exception |
| Zend_Config | | array $config |
Implements Zend_Http_Client_Adapter_Interface.
Definition at line 132 of file Curl.php.

| setCurlOption | ( | $ | option, |
| $ | value | ||
| ) |
| setOutputStream | ( | $ | stream | ) |
Set output stream for the response
| resource | $stream |
Implements Zend_Http_Client_Adapter_Stream.
Send request to the remote server
| string | $method | |
| Zend_Uri_Http | $uri | |
| float | $http_ver | |
| array | $headers | |
| string | $body |
| Zend_Http_Client_Adapter_Exception | If connection fails, connected to wrong host, no PUT file defined, unsupported method, or unsupported cURL option |
Make sure POSTFIELDS is set after $curlMethod is set: http://de2.php.net/manual/en/function.curl-setopt.php#81161
Implements Zend_Http_Client_Adapter_Interface.