mini\Mini::setScopeResolver()
public
Documentation
Replace the default scope resolver (see getScope()).
The closure must return the identity object of the current scope; Scoped services are cached per returned object (in a WeakMap), so the object should be collectable when the scope ends. Can only be called in Bootstrap phase.
Signature
public function setScopeResolver(Closure $resolver): void
Parameters
| Name | Type | Default |
|---|---|---|
$resolver
|
Closure |
required |
Returns
void