ImplicitContextKeyedInterface
in
Represents a value that can be stored within {@see ContextInterface}.
Allows storing themselves without exposing a ContextKeyInterface.
Tags
Table of Contents
Methods
- activate() : ScopeInterface
- Adds `$this` to the {@see Context::getCurrent() current context} and makes the new {@see Context} the current context.
- storeInContext() : ContextInterface
- Returns a new {@see ContextInterface} created by setting `$this` into the provided [@see ContextInterface}.
Methods
activate()
Adds `$this` to the {@see Context::getCurrent() current context} and makes the new {@see Context} the current context.
public
activate() : ScopeInterface
ScopeInterface::detach() MUST be called to properly restore the previous context.
This method is equivalent to Context::getCurrent().with($value).activate();
.
Tags
Return values
ScopeInterfacestoreInContext()
Returns a new {@see ContextInterface} created by setting `$this` into the provided [@see ContextInterface}.
public
storeInContext(ContextInterface $context) : ContextInterface
Parameters
- $context : ContextInterface