API Documentation

Zend/Http/Client/Adapter/Proxy.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Http  
Subpackage
Client_Adapter  
Version
$Id: Proxy.php 24818 2012-05-28 18:49:53Z rob $  

\Zend_Http_Client_Adapter_Proxy

Package: Zend\Http\Client\Adapter

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.

Parent(s)
\Zend_Http_Client_Adapter_Socket
Children
\Zend_Gdata_HttpAdapterStreamingProxy
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedarray  $config= 'array( 'ssltransport' => 'ssl''

Parameters array

Default valuearray( 'ssltransport' => 'ssl'Details
Type
array
Propertyprotectedstring  $connectHandshakeRequest= ''

Stores the last CONNECT handshake request

Details
Type
string
Propertyprotectedboolean  $negotiated= 'false'

Whether HTTPS CONNECT was already negotiated with the proxy or not

Default valuefalseDetails
Type
boolean

Methods

methodpublic__destruct( ) : void

Destructor: make sure the socket is disconnected

methodpublicclose( ) : void

Close the connection to the server

methodpublicconnect( string $host, int $port = 80, boolean $secure = false ) : void

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
Name Type Description
$host string
$port int
$secure boolean
methodprotectedconnectHandshake( string $host, integer $port = 443, string $http_ver = '1.1', array $headers = array() ) : void

Preform handshaking with HTTPS proxy using CONNECT method

Parameters
Name Type Description
$host string
$port integer
$http_ver string
$headers array
methodpublicwrite( string $method, \Zend_Uri_Http $uri, string $http_ver = '1.1', array $headers = array(), string $body = '' ) : string

Send request to the proxy server

Parameters
Name Type Description
$method string
$uri \Zend_Uri_Http
$http_ver string
$headers array
$body string
Returns
Type Description
string Request as string
Documentation was generated by DocBlox 0.15.1.