Свойство | Type | Description | |
---|---|---|---|
$_context | resource | Stream context | |
$config | array | Parameters array | |
$connected_to | array | What host/port are we connected to? | |
$method | string | Request method - will be set by write() and might be used by read() | |
$out_stream | resource | Stream for storing output | |
$socket | resource | null | The socket for server connection |
Méthode | Description | |
---|---|---|
__construct ( ) | Adapter constructor, currently empty. Config is set using setConfig() | |
__destruct ( ) | Destructor: make sure the socket is disconnected | |
close ( ) | Close the connection to the server | |
connect ( string $host, integer $port = 80, boolean $secure = false ) | Connect to the remote server | |
getConfig ( ) : array | Retrieve the array of all configuration options | |
getStreamContext ( ) : resource | Get the stream context for the TCP connection to the server. | |
read ( ) : string | Read response from server | |
setConfig ( $config = [] ) | Set the configuration array for the adapter | |
setOutputStream ( resource $stream ) : Zend_Http_Client_Adapter_Socket | Set output stream for the response | |
setStreamContext ( mixed $context ) : Zend_Http_Client_Adapter_Socket | Set the stream context for the TCP connection to the server | |
write ( string $method, Zend_Uri_Http $uri, string $http_ver = '1.1', array $headers = [], string $body = '' ) : string | Send request to the remote server |
Méthode | Description | |
---|---|---|
_checkSocketReadTimeout ( ) | Check if the socket has timed out - if so close connection and throw an exception |
public __construct ( ) |
public __destruct ( ) |
protected _checkSocketReadTimeout ( ) |
public getStreamContext ( ) : resource | ||
Résultat | resource |
public setConfig ( $config = [] ) |
public setOutputStream ( resource $stream ) : Zend_Http_Client_Adapter_Socket | ||
$stream | resource | |
Résultat | Zend_Http_Client_Adapter_Socket |
public setStreamContext ( mixed $context ) : Zend_Http_Client_Adapter_Socket | ||
$context | mixed | Stream context or array of context options |
Résultat | Zend_Http_Client_Adapter_Socket |
protected array $connected_to | ||
Résultat | array |
protected string $method | ||
Résultat | string |
protected resource $out_stream | ||
Résultat | resource |
protected resource|null $socket | ||
Résultat | resource | null |