class ContextState implements ReplicableContext

internal  
 

Hold one execution unit's inherited context and locally attached scopes.

Properties

protected Scope|null $scope

Methods

__construct(ContextInterface $baseContext)

Create a context state.

Scope|null
scope()

Return the active scope.

ContextInterface
current()

Return the active context.

void
attach(Scope $scope)

Push a scope onto this execution unit's stack.

int
detach(Scope $scope)

Detach a scope from this execution unit's stack.

replicate()

Create an independent child state from the active context.

Details

at line 24
__construct(ContextInterface $baseContext)

Create a context state.

Parameters

ContextInterface $baseContext

at line 31
Scope|null scope()

Return the active scope.

Return Value

Scope|null

at line 39
ContextInterface current()

Return the active context.

Return Value

ContextInterface

at line 47
void attach(Scope $scope)

Push a scope onto this execution unit's stack.

Parameters

Scope $scope

Return Value

void

at line 56
int detach(Scope $scope)

Detach a scope from this execution unit's stack.

Parameters

Scope $scope

Return Value

int

at line 90
ReplicableContext replicate()

Create an independent child state from the active context.

Return Value

ReplicableContext