Microsoft_Http
[ class tree: Microsoft_Http ] [ index: Microsoft_Http ] [ all elements ]

Class: Microsoft_Http_Client_Adapter_Proxy

Source Location: /Http/Client/Adapter/Proxy.php

Class Overview

Microsoft_Http_Client_Adapter_Socket
   |
   --Microsoft_Http_Client_Adapter_Proxy

HTTP Proxy-supporting Microsoft_Http_Client adapter class, based on the default socket based adapter.


Author(s):

Copyright:

  • Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)

Variables

Methods


Inherited Variables

Inherited Methods

Class: Microsoft_Http_Client_Adapter_Socket

Microsoft_Http_Client_Adapter_Socket::__construct()
Adapter constructor, currently empty. Config is set using setConfig()
Microsoft_Http_Client_Adapter_Socket::close()
Close the connection to the server
Microsoft_Http_Client_Adapter_Socket::connect()
Connect to the remote server
Microsoft_Http_Client_Adapter_Socket::getConfig()
Retrieve the array of all configuration options
Microsoft_Http_Client_Adapter_Socket::getStreamContext()
Get the stream context for the TCP connection to the server.
Microsoft_Http_Client_Adapter_Socket::read()
Read response from server
Microsoft_Http_Client_Adapter_Socket::setConfig()
Set the configuration array for the adapter
Microsoft_Http_Client_Adapter_Socket::setOutputStream()
Set output stream for the response
Microsoft_Http_Client_Adapter_Socket::setStreamContext()
Set the stream context for the TCP connection to the server
Microsoft_Http_Client_Adapter_Socket::write()
Send request to the remote server
Microsoft_Http_Client_Adapter_Socket::_checkSocketReadTimeout()
Check if the socket has timed out - if so close connection and throw an exception
Microsoft_Http_Client_Adapter_Socket::__destruct()
Destructor: make sure the socket is disconnected

Class Details

[line 44]
HTTP Proxy-supporting Microsoft_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 Microsoft_Http_Client_Adapter_Socket behavior. Just like the default Socket adapter, this adapter does not require any special extensions installed.




Tags:

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


[ Top ]


Class Variables

$config = array(
        'ssltransport'  => 'ssl',
        'sslcert'       => null,
        'sslpassphrase' => null,
        'proxy_host'    => '',
        'proxy_port'    => 8080,
        'proxy_user'    => '',
        'proxy_pass'    => '',
        'proxy_auth'    => Microsoft_Http_Client::AUTH_BASIC,
        'persistent'    => false
    )

[line 51]

Parameters array



Tags:

access:  protected

Type:   array
Overrides:   Array


[ Top ]

$negotiated =  false

[line 68]

Whether HTTPS CONNECT was already negotiated with the proxy or not



Tags:

access:  protected

Type:   boolean


[ Top ]



Class Methods


destructor __destruct [line 255]

void __destruct( )

Destructor: make sure the socket is disconnected



Tags:

access:  public


Overrides Microsoft_Http_Client_Adapter_Socket::__destruct() (Destructor: make sure the socket is disconnected)

[ Top ]

method close [line 245]

void close( )

Close the connection to the server



Tags:

access:  public


Overrides Microsoft_Http_Client_Adapter_Socket::close() (Close the connection to the server)

[ Top ]

method connect [line 80]

void connect( string $host, [int $port = 80], [boolean $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)




Tags:

access:  public


Overrides Microsoft_Http_Client_Adapter_Socket::connect() (Connect to the remote server)

Parameters:

string   $host  
int   $port  
boolean   $secure  

[ Top ]

method connectHandshake [line 177]

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

Preform handshaking with HTTPS proxy using CONNECT method



Tags:

access:  protected


Parameters:

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

[ Top ]

method write [line 105]

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

Send request to the proxy server



Tags:

return:  Request as string
access:  public


Overrides Microsoft_Http_Client_Adapter_Socket::write() (Send request to the remote server)

Parameters:

string   $method  
Microsoft_Uri_Http   $uri  
string   $http_ver  
array   $headers  
string   $body  

[ Top ]


Documentation generated on Wed, 18 May 2011 12:06:44 +0200 by phpDocumentor 1.4.3