PHP Class Aerys\VhostContainer

Inheritance: implements Countable, implements aerys\Monitor
Show file Open project: amphp/aerys Class Usage Examples

Public Methods

Method Description
__construct ( aerys\HttpDriver $driver )
__debugInfo ( )
count ( )
getBindableAddresses ( ) : array Retrieve an array of unique socket addresses on which hosts should listen
getDefaultHost ( ) : Vhost Retrieve the group's default host
getTlsBindingsByAddress ( ) : array Retrieve stream encryption settings by bind address
monitor ( ) : array
selectHost ( InternalRequest $ireq ) : Vhost | null Select a virtual host match for the specified request according to RFC 7230 criteria
selectHttpDriver ( $address, $port ) Select the suited HttpDriver instance, filtered by address and port pair
setupHttpDrivers ( $args )
use ( Vhost $vhost ) : void Add a virtual host to the collection

Private Methods

Method Description
addHttpDriver ( Vhost $vhost )
preventCryptoSocketConflict ( Vhost $new )
selectHostByAuthority ( InternalRequest $ireq )

Method Details

__construct() public method

public __construct ( aerys\HttpDriver $driver )
$driver aerys\HttpDriver

__debugInfo() public method

public __debugInfo ( )

count() public method

public count ( )

getBindableAddresses() public method

Retrieve an array of unique socket addresses on which hosts should listen
public getBindableAddresses ( ) : array
return array Returns an array of unique host addresses in the form: tcp://ip:port

getDefaultHost() public method

Retrieve the group's default host
public getDefaultHost ( ) : Vhost
return Vhost

getTlsBindingsByAddress() public method

Retrieve stream encryption settings by bind address
public getTlsBindingsByAddress ( ) : array
return array

monitor() public method

public monitor ( ) : array
return array

selectHost() public method

Select a virtual host match for the specified request according to RFC 7230 criteria
public selectHost ( InternalRequest $ireq ) : Vhost | null
$ireq InternalRequest
return Vhost | null Returns a Vhost object and boolean TRUE if a valid host selected, FALSE otherwise

selectHttpDriver() public method

Select the suited HttpDriver instance, filtered by address and port pair
public selectHttpDriver ( $address, $port )

setupHttpDrivers() public method

public setupHttpDrivers ( $args )

use() public method

Add a virtual host to the collection
public use ( Vhost $vhost ) : void
$vhost Vhost
return void