ContainerFactory
Class
Final:
Yes
Builds and caches the shared DevTools dependency injection container.
Description
The factory centralizes container bootstrapping so command traits and other internal helpers can resolve services without duplicating bootstrap logic or depending on the console application entrypoint.
Properties
: Container|null
Methods
Creates or returns the shared DevTools container instance.
public
static
create() : ContainerInterface
Return values
ContainerInterface
Description
the shared container instance
Resolves a service from the shared DevTools container.
public
static
get(
string|T>
$id) : mixed|T
Parameters
$id
:
string|T>
Description
the service identifier
template
Return values
mixed|T
Description
the resolved service
Returns whether the shared DevTools container can resolve a service.
public
static
has(
string
$id) : bool
Parameters
$id
:
string
Description
the service identifier
Return values
bool