- class
Environment
(php\lang\Environment
) - package
std
- source
php/lang/Environment.php
Description
Class Environment
Environment ::
current()
- Get environment of current execution
->
__construct()
->
registerSourceMap()
->
unregisterSourceMap()
->
execute()
- Executes $runnable in the environment->
importClass()
- Imports the $className to the environment->
exportClass()
- Exports the $className from th environment->
importFunction()
- Imports the $functionName to the environment->
exportFunction()
- Exports the $functionName from the environment->
importAutoLoaders()
- Imports the all spl auto loaders to the environment.->
defineConstant()
->
onMessage()
- Handles messages that sent to the environment->
onOutput()
->
sendMessage()
- Send message to the environment->
findModule()
->
getPackages()
->
hasPackage()
->
getPackage()
->
setPackage()
->
registerExtension()
->
addSuperGlobal()
->
hasSuperGlobal()
->
getSuperGlobals()
->
getGlobals()
- $GLOBALS of environment.->
getGlobal()
->
hasGlobal()
->
setGlobal()
Environment::current(): Environment
Get environment of current execution
__construct(php\lang\Environment $parent, int $flags): void
registerSourceMap(php\lang\SourceMap $sourceMap): void
unregisterSourceMap(php\lang\SourceMap $sourceMap): void
execute(callable $runnable): mixed
Executes $runnable in the environment
importClass(string $className): void
Imports the $className to the environment
exportClass(string $className): void
Exports the $className from th environment
importFunction(string $functionName): void
Imports the $functionName to the environment
exportFunction(string $functionName): void
Exports the $functionName from the environment
importAutoLoaders(): void
Imports the all spl auto loaders to the environment.
defineConstant(string $name, mixed $value, bool $caseSensitive): void
onMessage(callable $callback): void
Handles messages that sent to the environment
onOutput(callable|null $callback): void
sendMessage(mixed $message): mixed
Send message to the environment
findModule(string $path): Module|null
getPackages(): Package[]
hasPackage(string $name): bool
getPackage(string $name): Package
setPackage(string $name, php\lang\Package $package): void
registerExtension(string $extensionId): void
addSuperGlobal(string $name, mixed $value): void
hasSuperGlobal(string $name): bool
getSuperGlobals(): array
getGlobals(): array
$GLOBALS of environment.
getGlobal(string $name): mixed
hasGlobal(string $name): bool
setGlobal(string $name, mixed $value): void