Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Http_Client_Adapter_Proxy Class Reference

Public Member Functions

 connect ($host, $port=80, $secure=false)
 Connect to the remote server.
 
 write ($method, $uri, $http_ver= '1.1', $headers=array(), $body= '')
 Send request to the proxy server.
 
 close ()
 Close the connection to the server.
 
 __destruct ()
 Destructor: make sure the socket is disconnected.
 
- Public Member Functions inherited from Zend_Http_Client_Adapter_Socket
 __construct ()
 Adapter constructor, currently empty.
 
 setConfig ($config=array())
 Set the configuration array for the adapter.
 
 getConfig ()
 Retrieve the array of all configuration options.
 
 setStreamContext ($context)
 Set the stream context for the TCP connection to the server.
 
 getStreamContext ()
 Get the stream context for the TCP connection to the server.
 
 connect ($host, $port=80, $secure=false)
 Connect to the remote server.
 
 write ($method, $uri, $http_ver= '1.1', $headers=array(), $body= '')
 Send request to the remote server.
 
 read ()
 Read response from server.
 
 close ()
 Close the connection to the server.
 
 setOutputStream ($stream)
 Set output stream for the response.
 
 __destruct ()
 Destructor: make sure the socket is disconnected.
 

Protected Member Functions

 connectHandshake ($host, $port=443, $http_ver= '1.1', array &$headers=array())
 Preform handshaking with HTTPS proxy using CONNECT method.
 
- Protected Member Functions inherited from Zend_Http_Client_Adapter_Socket
 _checkSocketReadTimeout ()
 Check if the socket has timed out - if so close connection and throw an exception.
 

Protected Attributes

 $config
 
 $negotiated = false
 
 $connectHandshakeRequest
 
- Protected Attributes inherited from Zend_Http_Client_Adapter_Socket
 $socket = null
 
 $connected_to = array(null, null)
 
 $out_stream = null
 
 $config
 
 $method = null
 
 $_context = null
 

Constructor & Destructor Documentation

__destruct ( )

Destructor: make sure the socket is disconnected.

Member Function Documentation

close ( )

Close the connection to the server.

Implements Zend_Http_Client_Adapter_Interface.

connect (   $host,
  $port = 80,
  $secure = false 
)

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)

Parameters
string$host
int$port
boolean$secure

Implements Zend_Http_Client_Adapter_Interface.

connectHandshake (   $host,
  $port = 443,
  $http_ver = '1.1',
array &  $headers = array() 
)
protected

Preform handshaking with HTTPS proxy using CONNECT method.

Parameters
string$host
integer$port
string$http_ver
array$headers
Returns
void
Exceptions
Zend_Http_Client_Adapter_Exception
write (   $method,
  $uri,
  $http_ver = '1.1',
  $headers = array(),
  $body = '' 
)

Send request to the proxy server.

Parameters
string$method
Zend_Uri_Http$uri
string$http_ver
array$headers
string$body
Returns
string Request as string
Exceptions
Zend_Http_Client_Adapter_Exception

Implements Zend_Http_Client_Adapter_Interface.

Member Data Documentation

$config
protected
Initial value:
= array(
'ssltransport' => 'ssl',
'sslcert' => null,
'sslpassphrase' => null,
'sslusecontext' => false,
'proxy_host' => '',
'proxy_port' => 8080,
'proxy_user' => '',
'proxy_pass' => '',
'persistent' => false,
)
$connectHandshakeRequest
protected
$negotiated = false
protected