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

NameTypeDefault
$resolver Closure required

Returns

void

Source

src/Mini.php:278-283