프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_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 |
메소드 | 설명 | |
---|---|---|
__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 |
메소드 | 설명 | |
---|---|---|
_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 | ||
리턴 | resource |
public setOutputStream ( resource $stream ) : Zend_Http_Client_Adapter_Socket | ||
$stream | resource | |
리턴 | Zend_Http_Client_Adapter_Socket |
public setStreamContext ( mixed $context ) : Zend_Http_Client_Adapter_Socket | ||
$context | mixed | Stream context or array of context options |
리턴 | Zend_Http_Client_Adapter_Socket |
protected array $connected_to | ||
리턴 | array |
protected string $method | ||
리턴 | string |
protected resource|null $socket | ||
리턴 | resource | null |