PHP Class SimpleProxyRoute, simpletest

@package SimpleTest
Inheritance: extends SimpleRoute
Mostra file Open project: simpletest/simpletest

Public Methods

Method Description
__construct ( SimpleUrl $url, string $proxy, string $username = false, string $password = false ) Stashes the proxy address.
createConnection ( string $method, integer $timeout ) : SimpleSocket Opens a socket to the route.
getHostLine ( ) : string Creates the host part of the request.
getRequestLine ( string $method ) : string Creates the first line which is the actual request.

Method Details

__construct() public method

Stashes the proxy address.
public __construct ( SimpleUrl $url, string $proxy, string $username = false, string $password = false )
$url SimpleUrl URL as object.
$proxy string Proxy URL.
$username string Username for autentication.
$password string Password for autentication.

createConnection() public method

Opens a socket to the route.
public createConnection ( string $method, integer $timeout ) : SimpleSocket
$method string HTTP request method, usually GET.
$timeout integer Connection timeout.
return SimpleSocket New socket.

getHostLine() public method

Creates the host part of the request.
public getHostLine ( ) : string
return string Host line content.

getRequestLine() public method

Creates the first line which is the actual request.
public getRequestLine ( string $method ) : string
$method string HTTP request method, usually GET.
return string Request line content.