PHP Interface Kraken\Environment\EnvironmentInterface

Mostrar archivo Open project: kraken-php/framework

Public Methods

Method Description
getEnv ( string $name ) : string | null Search the different places for environment variables and return first value found.
getOption ( string $key ) : string | boolean Return PHP ini.setting for key=$key.
registerErrorHandler ( callable $handler ) Register Error Handler.
registerExceptionHandler ( callable $handler ) Register Exception Handler.
registerShutdownHandler ( callable $handler ) Register Shutdown Handler.
registerTerminationHandler ( callable $handler ) Register Termination Handler.
removeEnv ( string $name ) Remove an environment variable.
removeOption ( string $key ) : string | boolean Restore PHP ini.setting of key=$key to its default value.
setEnv ( string $name, string | null $value ) Set an environment variable.
setOption ( string $key, string $val ) : string | boolean Set PHP ini.settings of key=$key to value=$val.

Method Details

getEnv() public method

Search the different places for environment variables and return first value found.
public getEnv ( string $name ) : string | null
$name string
return string | null

getOption() public method

Return PHP ini.setting for key=$key.
public getOption ( string $key ) : string | boolean
$key string
return string | boolean

registerErrorHandler() public method

Register Error Handler.
public registerErrorHandler ( callable $handler )
$handler callable

registerExceptionHandler() public method

Register Exception Handler.
public registerExceptionHandler ( callable $handler )
$handler callable

registerShutdownHandler() public method

Register Shutdown Handler.
public registerShutdownHandler ( callable $handler )
$handler callable

registerTerminationHandler() public method

Register Termination Handler.
public registerTerminationHandler ( callable $handler )
$handler callable

removeEnv() public method

Remove an environment variable.
public removeEnv ( string $name )
$name string

removeOption() public method

Restore PHP ini.setting of key=$key to its default value.
public removeOption ( string $key ) : string | boolean
$key string
return string | boolean

setEnv() public method

The environment variable value is stripped of single and double quotes.
public setEnv ( string $name, string | null $value )
$name string
$value string | null

setOption() public method

Set PHP ini.settings of key=$key to value=$val.
public setOption ( string $key, string $val ) : string | boolean
$key string
$val string
return string | boolean