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.
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 |
inherited_from | \Zend_Http_Client_Adapter_Socket |
__construct()
__destruct()
If we are in persistent TCP mode, will not close the connection
inherited_from | \Zend_Http_Client_Adapter_Socket::__destruct() |
---|
__destruct()
If we are in persistent TCP mode, will not close the connection
close()
inherited_from | \Zend_Http_Client_Adapter_Socket::close() |
---|
close()
inherited_from | \Zend_Http_Client_Adapter_Interface::close() |
---|
connect(string $host, integer $port= 80
, boolean $secure= false
)
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)
inherited_from | \Zend_Http_Client_Adapter_Socket::connect() |
---|
string
integer
boolean
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_Socket::write() |
---|
string
\Zend_Uri_Http
string
array
string
\Zend_Http_Client_Adapter_Exception |
---|
string
Request as stringwrite(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 |
---|
connectHandshake(string $host, integer $port= 443
, string $http_ver= '1.1'
, array $headers= array()
) : void
string
integer
string
array
\Zend_Http_Client_Adapter_Exception |
---|
$_context : resource
null
$config : array
array('ssltransport' => 'ssl', 'sslcert' => null, 'sslpassphrase' => null, 'sslusecontext' => false, 'proxy_host' => '', 'proxy_port' => 8080, 'proxy_user' => '', 'proxy_pass' => '', 'proxy_auth' => \Zend_Http_Client::AUTH_BASIC, 'persistent' => false)
inherited_from | \Zend_Http_Client_Adapter_Socket::config |
---|
$config : array
array('persistent' => false, 'ssltransport' => 'ssl', 'sslcert' => null, 'sslpassphrase' => null, 'sslusecontext' => false)
$connectHandshakeRequest : string
$connected_to : array
array(null, null)
$method : string
null
$negotiated : boolean
false
$out_stream : resource
null
$socket : resource | null
null