Skip to content

Latest commit

 

History

History
301 lines (211 loc) · 5.24 KB

Environment.md

File metadata and controls

301 lines (211 loc) · 5.24 KB

Environment

  • 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


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