|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct () | |
| setConfig ($config=array()) | |
| getConfig () | |
| setStreamContext ($context) | |
| getStreamContext () | |
| connect ($host, $port=80, $secure=false) | |
| write ($method, $uri, $http_ver='1.1', $headers=array(), $body='') | |
| read () | |
| close () | |
| setOutputStream ($stream) | |
| __destruct () | |
Protected Member Functions | |
| _checkSocketReadTimeout () | |
Protected Attributes | |
| $socket = null | |
| $connected_to = array(null, null) | |
| $out_stream = null | |
| $config | |
| $method = null | |
| $_context = null | |
Definition at line 47 of file Socket.php.
| __construct | ( | ) |
Adapter constructor, currently empty. Config is set using setConfig()
Definition at line 101 of file Socket.php.
| __destruct | ( | ) |
Destructor: make sure the socket is disconnected
If we are in persistent TCP mode, will not close the connection
Definition at line 537 of file Socket.php.
|
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 |
Definition at line 503 of file Socket.php.
| close | ( | ) |
Close the connection to the server
Implements Zend_Http_Client_Adapter_Interface.
Definition at line 490 of file Socket.php.
| connect | ( | $host, | |
$port = 80, |
|||
$secure = false |
|||
| ) |
Connect to the remote server
| string | $host | |
| int | $port | |
| boolean | $secure |
Implements Zend_Http_Client_Adapter_Interface.
Definition at line 192 of file Socket.php.
| getConfig | ( | ) |
Retrieve the array of all configuration options
Definition at line 132 of file Socket.php.
| getStreamContext | ( | ) |
Get the stream context for the TCP connection to the server.
If no stream context is set, will create a default one.
Definition at line 176 of file Socket.php.
| 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.
Definition at line 315 of file Socket.php.
| setConfig | ( | $config = array() | ) |
Set the configuration array for the adapter
| Zend_Config | array | $config |
Implements Zend_Http_Client_Adapter_Interface.
Definition at line 110 of file Socket.php.
| setOutputStream | ( | $stream | ) |
Set output stream for the response
| resource | $stream |
Implements Zend_Http_Client_Adapter_Stream.
Definition at line 525 of file Socket.php.
| 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 |
Definition at line 150 of file Socket.php.
| 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.
Definition at line 260 of file Socket.php.
|
protected |
Definition at line 95 of file Socket.php.
|
protected |
Definition at line 75 of file Socket.php.
|
protected |
Definition at line 61 of file Socket.php.
|
protected |
Definition at line 88 of file Socket.php.
|
protected |
Definition at line 68 of file Socket.php.
|
protected |
Definition at line 54 of file Socket.php.