PHP Class Aerys\Vhost

Inheritance: implements aerys\Monitor
ファイルを表示 Open project: amphp/aerys Class Usage Examples

Public Methods

Method Description
__construct ( string $name, array $interfaces, callable $application, array $filters, array $monitors = [], aerys\HttpDriver $driver = null )
__debugInfo ( ) : array Simplify debug output
__toString ( ) : string Returns the host name
getApplication ( ) : callable Retrieve the host's callable application
getBindableAddresses ( ) : array Retrieve the URIs on which this host should be bound
getFilters ( ) : array Retrieve filters registered for this host
getHttpDriver ( )
getIds ( ) : array Retrieve the name:port IDs for this host
getInterfaces ( ) : array Retrieve the list of address-port pairs on which this host listens (address may be a wildcard "0.0.0.0" or "[::]")
getName ( ) : string Retrieve the host's name (may be an empty string)
getPorts ( string $address ) : array
getTlsContextArr ( ) : array Retrieve this host's TLS connection context options
hasName ( ) : boolean Does this host have a name?
isEncrypted ( ) : boolean Has this host been assigned a TLS encryption context?
monitor ( ) : array
setCrypto ( array $tls ) : void Define TLS encryption settings for this host

Private Methods

Method Description
addInterface ( array $interface )
hasAlpnSupport ( ) : boolean
normalizeTlsCryptoMethod ( array $tls ) : array
parseNamesFromTlsCertArray ( array $cert ) : array

Method Details

__construct() public method

public __construct ( string $name, array $interfaces, callable $application, array $filters, array $monitors = [], aerys\HttpDriver $driver = null )
$name string
$interfaces array
$application callable
$filters array
$monitors array
$driver aerys\HttpDriver

__debugInfo() public method

Simplify debug output
public __debugInfo ( ) : array
return array

__toString() public method

Returns the host name
public __toString ( ) : string
return string

getApplication() public method

Retrieve the host's callable application
public getApplication ( ) : callable
return callable

getBindableAddresses() public method

Retrieve the URIs on which this host should be bound
public getBindableAddresses ( ) : array
return array

getFilters() public method

Retrieve filters registered for this host
public getFilters ( ) : array
return array

getHttpDriver() public method

public getHttpDriver ( )

getIds() public method

Retrieve the name:port IDs for this host
public getIds ( ) : array
return array

getInterfaces() public method

Retrieve the list of address-port pairs on which this host listens (address may be a wildcard "0.0.0.0" or "[::]")
public getInterfaces ( ) : array
return array

getName() public method

Retrieve the host's name (may be an empty string)
public getName ( ) : string
return string

getPorts() public method

public getPorts ( string $address ) : array
$address string
return array

getTlsContextArr() public method

Retrieve this host's TLS connection context options
public getTlsContextArr ( ) : array
return array An array of stream encryption context options

hasName() public method

Does this host have a name?
public hasName ( ) : boolean
return boolean

isEncrypted() public method

Has this host been assigned a TLS encryption context?
public isEncrypted ( ) : boolean
return boolean Returns true if a TLS context is assigned, false otherwise

monitor() public method

public monitor ( ) : array
return array

setCrypto() public method

Define TLS encryption settings for this host
public setCrypto ( array $tls ) : void
$tls array An array mapping TLS stream context values
return void