PHP Class SimpleProxyRoute, simpletest

@package SimpleTest
Inheritance: extends SimpleRoute
Afficher le fichier Open project: simpletest/simpletest

Méthodes publiques

Méthode 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 méthode

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 méthode

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

getHostLine() public méthode

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

getRequestLine() public méthode

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