__construct()
__destruct()
close()
connect()
getConfig()
getStreamContext()
read()
setOptions()
setOutputStream()
setStreamContext()
write()
_checkSocketReadTimeout()
connectHandshake()
$config
$connectedTo
$context
$method
$negotiated
$outStream
$socket
$sslCryptoTypes
HTTP Proxy-supporting Zend\Http\Client adapter class, based on the default socket based adapter.
Should be used if proxy HTTP access is required. If no proxy is set, will fall back to Zend\Http\Client\Adapter\Socket behavior. Just like the default Socket adapter, this adapter does not require any special extensions installed.
__construct()
Config is set using setOptions()
inherited_from | \Zend\Http\Client\Adapter\Socket::__construct() |
---|
__destruct()
If we are in persistent TCP mode, will not close the connection
close()
connect(string $host, int $port, bool $secure)
Will try to connect to the proxy server. If no proxy was set, will fall back to the target server (behave like regular Socket adapter)
string
int
bool
\Zend\Http\Client\Adapter\Exception\RuntimeException |
---|
getConfig() : array
inherited_from | \Zend\Http\Client\Adapter\Socket::getConfig() |
---|
array
getStreamContext() : resource
If no stream context is set, will create a default one.
inherited_from | \Zend\Http\Client\Adapter\Socket::getStreamContext() |
---|
resource
read() : string
inherited_from | \Zend\Http\Client\Adapter\Socket::read() |
---|
\Zend\Http\Client\Adapter\Exception\RuntimeException |
---|
string
setOptions(array $options)
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\Socket::setOutputStream() |
---|
resource
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 |
---|---|
inherited_from | \Zend\Http\Client\Adapter\Socket::setStreamContext() |
mixed
Stream context or array of context options
\Zend\Http\Client\Adapter\Exception\InvalidArgumentException |
---|
write(string $method, \Zend\Uri\Uri $uri, string $httpVer, array $headers, string $body) : string
string
\Zend\Uri\Uri
string
array
string
\Zend\Http\Client\Adapter\Exception\RuntimeException |
---|
string
Request as string_checkSocketReadTimeout()
inherited_from | \Zend\Http\Client\Adapter\Socket::_checkSocketReadTimeout() |
---|
\Zend\Http\Client\Adapter\Exception\TimeoutException |
with READ_TIMEOUT code |
---|
connectHandshake(string $host, int $port, string $httpVer, array $headers)
string
int
string
array
\Zend\Http\Client\Adapter\Exception\RuntimeException |
---|
$config : array
$connectedTo : array
inherited_from | \Zend\Http\Client\Adapter\Socket::$$connectedTo |
---|
$context : resource
inherited_from | \Zend\Http\Client\Adapter\Socket::$$context |
---|
$method : string
inherited_from | \Zend\Http\Client\Adapter\Socket::$$method |
---|
$negotiated : bool
$outStream : resource
inherited_from | \Zend\Http\Client\Adapter\Socket::$$outStream |
---|
$socket : resource | null
inherited_from | \Zend\Http\Client\Adapter\Socket::$$socket |
---|
$sslCryptoTypes : array
inherited_from | \Zend\Http\Client\Adapter\Socket::$$sslCryptoTypes |
---|