Container::bindIf()

void bindIf(string $abstract, Closure|string|null $concrete = null, bool $shared = false) Register a binding if it hasn't already been registered. Parameters string $abstract Closure|string|null $concrete bool $shared Return Value void

Container::bind()

void bind(string|array $abstract, Closure|string|null $concrete = null, bool $shared = false) Register a binding with the container. Parameters string|array $abstract Closure|string|null $concrete bool $shared Return Value void

Container::bind()

void bind(string|array $abstract, Closure|string|null $concrete = null, bool $shared = false) Register a binding with the container. Parameters string|array $abstract Closure|string|null $concrete bool $shared Return Value void

Container::alias()

void alias(string $abstract, string $alias) Alias a type to a different name. Parameters string $abstract string $alias Return Value void

Container::alias()

void alias(string $abstract, string $alias) Alias a type to a different name. Parameters string $abstract string $alias Return Value void

Container::afterResolving()

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

Container::afterResolving()

void afterResolving(string $abstract, Closure $callback = null) Register a new after resolving callback for all types. Parameters string $abstract Closure $callback Return Value void

Container::addContextualBinding()

void addContextualBinding(string $concrete, string $abstract, Closure|string $implementation) Add a contextual binding to the container. Parameters string $concrete string $abstract Closure|string $implementation Return Value void

Container

Container interface Container (View source) Methods bool bound(string $abstract) Determine if the given abstract type has been bound. void alias(string $abstract, string $alias) Alias a type to a different name. void tag(array|string $abstracts, array|mixed $tags) Assign a set of tags to a given binding. array tagged(array $tag) Resolve all of the bindings for a given tag. void bind(string|array $abstract, Closure|string|null $concrete = null, bool $shared = false) Reg

Container

Container class Container implements ArrayAccess, Container (View source) Properties array $contextual The contextual binding map.