## Zend_Http_Client_Adapter_Proxy

Description

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.

- copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- license: New BSD License

Located in /Http/Client/Adapter/Proxy.php (line 52)

    Zend_Http_Client_Adapter_Socket
       |
       --Zend_Http_Client_Adapter_Proxy

Direct descendents

Class | Description
--- | ---
Zend_Gdata_HttpAdapterStreamingProxy | Extends the proxy HTTP adapter to handle streams instead of discrete body strings.

Variable Summary
array $config
boolean $negotiated
Method Summary
void __destruct ()
void close ()
void connect (string $host, [int $port = 80], [boolean $secure = false])
void connectHandshake (string $host, [integer $port = 443], [string $http_ver = '1.1'], [ &$headers = array()], array $headers)
string write (string $method, Zend_Uri_Http $uri, [string $http_ver = '1.1'], [array $headers = array()], [string $body = ''])
Variables
array $config = 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
) (line 59)

Parameters array

- access: protected

Redefinition of:

Zend_Http_Client_Adapter_Socket::$config
  Parameters array

boolean $negotiated = false (line 77)

Whether HTTPS CONNECT was already negotiated with the proxy or not

- access: protected

#### Inherited Variables

Inherited from Zend_Http_Client_Adapter_Socket

> Zend_Http_Client_Adapter_Socket::$connected_to
> Zend_Http_Client_Adapter_Socket::$method
> Zend_Http_Client_Adapter_Socket::$out_stream
> Zend_Http_Client_Adapter_Socket::$socket
> Zend_Http_Client_Adapter_Socket::$_context

Methods
Destructor __destruct (line 280)

Destructor: make sure the socket is disconnected

- access: public

void __destruct ()

Redefinition of:

Zend_Http_Client_Adapter_Socket::__destruct()
  Destructor: make sure the socket is disconnected

close (line 270)

Close the connection to the server

- access: public

void close ()

Redefinition of:

Zend_Http_Client_Adapter_Socket::close()
  Close the connection to the server

connect (line 89)

Connect to the remote server

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)

- access: public

void connect (string $host, [int $port = 80], [boolean $secure = false])

- string $host
- int $port
- boolean $secure

Redefinition of:

Zend_Http_Client_Adapter_Socket::connect()
  Connect to the remote server

connectHandshake (line 202)

Preform handshaking with HTTPS proxy using CONNECT method

- access: protected

void connectHandshake (string $host, [integer $port = 443], [string $http_ver = '1.1'], [ &$headers = array()], array $headers)

- string $host
- integer $port
- string $http_ver
- array $headers
- array &$headers

write (line 119)

Send request to the proxy server

- return: Request as string
- access: public

string write (string $method, Zend_Uri_Http $uri, [string $http_ver = '1.1'], [array $headers = array()], [string $body = ''])

- string $method
- Zend_Uri_Http $uri
- string $http_ver
- array $headers
- string $body

Redefinition of:

Zend_Http_Client_Adapter_Socket::write()
  Send request to the remote server

Redefined in descendants as:

- Zend_Gdata_HttpAdapterStreamingProxy::write() : Send request to the proxy server with streaming support

#### Inherited Methods

Inherited From Zend_Http_Client_Adapter_Socket

> Zend_Http_Client_Adapter_Socket::__construct()
> Zend_Http_Client_Adapter_Socket::close()
> Zend_Http_Client_Adapter_Socket::connect()
> Zend_Http_Client_Adapter_Socket::getConfig()
> Zend_Http_Client_Adapter_Socket::getStreamContext()
> Zend_Http_Client_Adapter_Socket::read()
> Zend_Http_Client_Adapter_Socket::setConfig()
> Zend_Http_Client_Adapter_Socket::setOutputStream()
> Zend_Http_Client_Adapter_Socket::setStreamContext()
> Zend_Http_Client_Adapter_Socket::write()
> Zend_Http_Client_Adapter_Socket::_checkSocketReadTimeout()
> Zend_Http_Client_Adapter_Socket::__destruct()

Documentation generated on Tue, 26 Oct 2010 20:09:09 +0400 by phpDocumentor 1.4.2