Scope
class Scope implements ContextStorageScopeInterface
| internal |
Represent one context attachment owned by a single execution unit.
Properties
| protected array<array-key, mixed> | $localStorage | ||
| protected Scope|null | $previous | ||
| protected Scope|null | $next | ||
| protected bool | $detached |
Methods
Create a context scope.
Determine whether local scope storage contains an offset.
Return a value from local scope storage.
Store a value in local scope storage.
Remove a value from local scope storage.
Return the context attached by this scope.
Detach this scope from its owning execution unit.
Determine whether this scope was already detached.
Mark this scope as detached.
Details
at line 31
__construct(CoroutineContextStorage $storage, ContextState $state, ContextInterface $context)
Create a context scope.
at line 41
bool
offsetExists(mixed $offset)
Determine whether local scope storage contains an offset.
at line 50
mixed
offsetGet(mixed $offset)
Return a value from local scope storage.
at line 59
void
offsetSet(mixed $offset, mixed $value)
Store a value in local scope storage.
at line 68
void
offsetUnset(mixed $offset)
Remove a value from local scope storage.
at line 77
ContextInterface
context()
Return the context attached by this scope.
at line 86
int
detach()
Detach this scope from its owning execution unit.
at line 99
void
linkAfter(Scope|null $previous)
Link this scope after the previous active scope.
at line 111
Scope|null
unlink()
Unlink this scope and return its previous scope.
at line 132
Scope|null
previous()
Return the previous scope in the stack.
at line 140
bool
isDetached()
Determine whether this scope was already detached.
at line 148
void
markDetached()
Mark this scope as detached.