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