Container::when()

ContextualBindingBuilder when(string $concrete) Define a contextual binding. Parameters string $concrete Return Value ContextualBindingBuilder

Container::tagged()

array tagged(array $tag) Resolve all of the bindings for a given tag. Parameters array $tag Return Value array

Container::tagged()

array tagged(array $tag) Resolve all of the bindings for a given tag. Parameters array $tag Return Value array

Container::tag()

void tag(array|string $abstracts, array|mixed $tags) Assign a set of tags to a given binding. Parameters array|string $abstracts array|mixed $tags Return Value void

Container::tag()

void tag(array|string $abstracts, array|mixed $tags) Assign a set of tags to a given binding. Parameters array|string $abstracts array|mixed $tags Return Value void

Container::singleton()

void singleton(string|array $abstract, Closure|string|null $concrete = null) Register a shared binding in the container. Parameters string|array $abstract Closure|string|null $concrete Return Value void

Container::singleton()

void singleton(string|array $abstract, Closure|string|null $concrete = null) Register a shared binding in the container. Parameters string|array $abstract Closure|string|null $concrete Return Value void

Container::share()

Closure share(Closure $closure) Wrap a Closure such that it is shared. Parameters Closure $closure Return Value Closure

Container::setInstance()

static Container setInstance(Container $container = null) Set the shared instance of the container. Parameters Container $container Return Value Container

Container::resolving()

void resolving(string $abstract, Closure $callback = null) Register a new resolving callback. Parameters string $abstract Closure $callback Return Value void