class Scope

Methods

__construct(Scope $parent = null)

No description

enter()

Opens a new child scope.

Scope|null
leave()

Closes current scope and returns parent one.

set(string $key, mixed $value)

Stores data into current scope.

bool
has(string $key)

Tests if a data is visible from current scope.

mixed
get(string $key, mixed $default = null)

Returns data visible from current scope.

Details

at line line 37
__construct(Scope $parent = null)

Parameters

Scope $parent

at line line 47
Scope enter()

Opens a new child scope.

Return Value

Scope

at line line 57
Scope|null leave()

Closes current scope and returns parent one.

Return Value

Scope|null

at line line 74
Scope set(string $key, mixed $value)

Stores data into current scope.

Parameters

string $key
mixed $value

Return Value

Scope Current scope

Exceptions

LogicException

at line line 92
bool has(string $key)

Tests if a data is visible from current scope.

Parameters

string $key

Return Value

bool

at line line 113
mixed get(string $key, mixed $default = null)

Returns data visible from current scope.

Parameters

string $key
mixed $default

Return Value

mixed