ContainerFactory
Composes a fresh container through the incremental ContainerBuilder API.
Description
This factory SHALL register the supplied initializers with a new builder and delegate assembly to it. The factory MUST NOT retain assembled container state. Source order, provider wrapper injection, and optional configuration policy SHALL remain consistent with direct builder composition.
Methods
Creates and assembles a fresh container stack.
Creates and assembles a fresh container stack.
public
static
create(ConfigInterface|ContainerInterface|ServiceProviderInterface|string
...$initializers) : ContainerInterface
Description
This method SHALL pass initializers to a new ContainerBuilder in supplied order. Class names MUST be instantiable without required constructor arguments. Supplied PSR-11 containers SHALL be reused without cloning their state.
Parameters
$initializers
:
ConfigInterface|ContainerInterface|ServiceProviderInterface|string
Description
the ordered configuration objects, containers, providers, or initializer class names
Return values
Description
the composed and autowire-enabled container