Zend Framework
1.12
|
Public Member Functions | |
__construct () | |
Adapter constructor, currently empty. | |
setConfig ($config=array()) | |
Set the configuration array for the adapter. | |
getConfig () | |
Retrieve the array of all configuration options. | |
setStreamContext ($context) | |
Set the stream context for the TCP connection to the server. | |
getStreamContext () | |
Get the stream context for the TCP connection to the server. | |
connect ($host, $port=80, $secure=false) | |
Connect to the remote server. | |
write ($method, $uri, $http_ver= '1.1', $headers=array(), $body= '') | |
Send request to the remote server. | |
read () | |
Read response from server. | |
close () | |
Close the connection to the server. | |
setOutputStream ($stream) | |
Set output stream for the response. | |
__destruct () | |
Destructor: make sure the socket is disconnected. | |
Protected Member Functions | |
_checkSocketReadTimeout () | |
Check if the socket has timed out - if so close connection and throw an exception. | |
Protected Attributes | |
$socket = null | |
$connected_to = array(null, null) | |
$out_stream = null | |
$config | |
$method = null | |
$_context = null | |
__construct | ( | ) |
Adapter constructor, currently empty.
Config is set using setConfig()
__destruct | ( | ) |
Destructor: make sure the socket is disconnected.
If we are in persistent TCP mode, will not close the connection
|
protected |
Check if the socket has timed out - if so close connection and throw an exception.
Zend_Http_Client_Adapter_Exception | with READ_TIMEOUT code |
close | ( | ) |
Close the connection to the server.
Implements Zend_Http_Client_Adapter_Interface.
connect | ( | $host, | |
$port = 80 , |
|||
$secure = false |
|||
) |
Connect to the remote server.
string | $host | |
int | $port | |
boolean | $secure |
Implements Zend_Http_Client_Adapter_Interface.
getConfig | ( | ) |
Retrieve the array of all configuration options.
getStreamContext | ( | ) |
Get the stream context for the TCP connection to the server.
If no stream context is set, will create a default one.
read | ( | ) |
Read response from server.
Responses to HEAD requests and 204 or 304 responses are not expected to have a body - stop reading here
Implements Zend_Http_Client_Adapter_Interface.
setConfig | ( | $config = array() | ) |
Set the configuration array for the adapter.
Zend_Config | array | $config |
Implements Zend_Http_Client_Adapter_Interface.
setOutputStream | ( | $stream | ) |
Set output stream for the response.
resource | $stream |
Implements Zend_Http_Client_Adapter_Stream.
setStreamContext | ( | $context | ) |
Set the stream context for the TCP connection to the server.
Can accept either a pre-existing stream context resource, or an array of stream options, similar to the options array passed to the stream_context_create() PHP function. In such case a new stream context will be created using the passed options.
mixed | $context | Stream context or array of context options |
write | ( | $method, | |
$uri, | |||
$http_ver = '1.1' , |
|||
$headers = array() , |
|||
$body = '' |
|||
) |
Send request to the remote server.
string | $method | |
Zend_Uri_Http | $uri | |
string | $http_ver | |
array | $headers | |
string | $body |
Implements Zend_Http_Client_Adapter_Interface.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |