A sockets based (stream_socket_client) adapter class for Zend_Http_Client. Can be used on almost every PHP environment, and does not require any special extensions.
category | Zend |
---|---|
package | Zend_Http |
subpackage | Client_Adapter |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct()
__destruct()
If we are in persistent TCP mode, will not close the connection
close()
inherited_from | \Zend_Http_Client_Adapter_Interface::close() |
---|
connect(string $host, integer $port= 80
, boolean $secure= false
)
inherited_from | \Zend_Http_Client_Adapter_Interface::connect() |
---|
string
integer
boolean
getConfig() : array
array
getStreamContext() : resource
If no stream context is set, will create a default one.
resource
read() : string
inherited_from | \Zend_Http_Client_Adapter_Interface::read() |
---|
string
setConfig(array $config = array()
)
inherited_from | \Zend_Http_Client_Adapter_Interface::setConfig() |
---|
setOutputStream(resource $stream) : \Zend_Http_Client_Adapter_Socket
This function sets output stream where the result will be stored.
inherited_from | \Zend_Http_Client_Adapter_Stream::setOutputStream() |
---|
resource
\Zend_Http_Client_Adapter_Socket
setStreamContext(mixed $context) : \Zend_Http_Client_Adapter_Socket
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.
since | Zend Framework 1.9 |
---|
mixed
Stream context or array of context options
\Zend_Http_Client_Adapter_Socket
write(string $method, \Zend_Uri_Http $uri, string $http_ver= '1.1'
, array $headers= array()
, string $body= ''
) : string
inherited_from | \Zend_Http_Client_Adapter_Interface::write() |
---|
string
\Zend_Uri_Http
string
array
string
string
Request as string_checkSocketReadTimeout()
\Zend_Http_Client_Adapter_Exception |
with READ_TIMEOUT code |
---|
$_context : resource
null
$config : array
array('persistent' => false, 'ssltransport' => 'ssl', 'sslcert' => null, 'sslpassphrase' => null, 'sslusecontext' => false)
$connected_to : array
array(null, null)
$method : string
null
$out_stream : resource
null
$socket : resource | null
null