Environment¶
-
php\lang\Environment
Class Environment
Constants
Methods
__construct
($parent = NULL, $flags = 0)¶
Параметры:
- $parent – php\lang\Environment
- $flags –
int
- Environment::HOT_RELOAD, Environment::CONCURRENT
registerSourceMap
($sourceMap)¶
Параметры:
- $sourceMap – php\lang\SourceMap
unregisterSourceMap
($sourceMap)¶
Параметры:
- $sourceMap – php\lang\SourceMap
execute
($runnable)¶Executes $runnable in the environment
Параметры:
- $runnable –
callable
- - in new environmentРезультат:
mixed
importClass
($className)¶Imports the $className to the environment
throws
php\lang\\Exception
- if class not found or already registered
Параметры:
- $className –
string
exportClass
($className)¶Exports the $className from th environment
throws
php\lang\\Exception
- if class not found or already registered
Параметры:
- $className –
string
importFunction
($functionName)¶Imports the $functionName to the environment
throws
php\lang\\Exception
- if function not found or already registered
Параметры:
- $functionName –
string
exportFunction
($functionName)¶Exports the $functionName from the environment
throws
php\lang\\Exception
- if function not found or already registered
Параметры:
- $functionName –
string
importAutoLoaders
()¶
defineConstant
($name, $value, $caseSensitive = true)¶throws
php\lang\\Exception
- if constant already registered or value is not scalar type
Параметры:
- $name –
string
- $value –
mixed
- - scalar value- $caseSensitive –
bool
onMessage
($callback)¶Handles messages that sent to the environment
Параметры:
- $callback –
callable
onOutput
($callback)¶
Параметры:
- $callback –
callable
sendMessage
($message)¶Send message to the environment
Параметры:
- $message –
mixed
Результат:
mixed
findModule
($path)¶
Параметры:
- $path –
string
Результат: php\lang\Module,
null
- static
current
¶Get environment of current execution
Результат: php\lang\Environment