Moodle  2.2.1
http://www.collinsharper.com
Zend_Http_Client_Adapter_Curl Class Reference
Inheritance diagram for Zend_Http_Client_Adapter_Curl:
Collaboration diagram for Zend_Http_Client_Adapter_Curl:

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

Detailed Description

Definition at line 48 of file Curl.php.


Constructor & Destructor Documentation

Adapter constructor

Config is set using setConfig()

Returns:
void
Exceptions:
Zend_Http_Client_Adapter_Exception

Definition at line 100 of file Curl.php.


Member Function Documentation

close ( )

Close the connection to the server

Implements Zend_Http_Client_Adapter_Interface.

Definition at line 464 of file Curl.php.

Here is the caller graph for this function:

connect ( host,
port = 80,
secure = false 
)

Initialize curl

Parameters:
string$host
int$port
boolean$secure
Returns:
void
Exceptions:
Zend_Http_Client_Adapter_Exceptionif unable to connect

Implements Zend_Http_Client_Adapter_Interface.

Definition at line 202 of file Curl.php.

Here is the call graph for this function:

getConfig ( )

Retrieve the array of all configuration options

Returns:
array

Definition at line 172 of file Curl.php.

getHandle ( )

Get cUrl Handle

Returns:
resource

Definition at line 478 of file Curl.php.

read ( )

Return read response from server

Returns:
string

Implements Zend_Http_Client_Adapter_Interface.

Definition at line 455 of file Curl.php.

readHeader ( curl,
header 
)

Header reader function for CURL

Parameters:
resource$curl
string$header
Returns:
int

Definition at line 502 of file Curl.php.

setConfig ( config = array())

Set the configuration array for the adapter

Exceptions:
Zend_Http_Client_Adapter_Exception
Parameters:
Zend_Config| array $config
Returns:
Zend_Http_Client_Adapter_Curl

Implements Zend_Http_Client_Adapter_Interface.

Definition at line 132 of file Curl.php.

Here is the call graph for this function:

setCurlOption ( option,
value 
)

Direct setter for cURL adapter related options.

Parameters:
string | int$option
mixed$value
Returns:
Zend_Http_Adapter_Curl

Definition at line 184 of file Curl.php.

Here is the caller graph for this function:

setOutputStream ( stream)

Set output stream for the response

Parameters:
resource$stream
Returns:
Zend_Http_Client_Adapter_Socket

Implements Zend_Http_Client_Adapter_Stream.

Definition at line 489 of file Curl.php.

write ( method,
uri,
httpVersion = 1.1,
headers = array(),
body = '' 
)

Send request to the remote server

Parameters:
string$method
Zend_Uri_Http$uri
float$http_ver
array$headers
string$body
Returns:
string $request
Exceptions:
Zend_Http_Client_Adapter_ExceptionIf 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.

Definition at line 262 of file Curl.php.


Field Documentation

$_config = array() [protected]

Definition at line 55 of file Curl.php.

$_connected_to = array(null, null) [protected]

Definition at line 62 of file Curl.php.

$_curl = null [protected]

Definition at line 69 of file Curl.php.

$_invalidOverwritableCurlOptions [protected]

Definition at line 76 of file Curl.php.

$_response = null [protected]

Definition at line 83 of file Curl.php.

$out_stream [protected]

Definition at line 90 of file Curl.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations