Skip to content

ContainerFactory

github-actions[bot] edited this page Oct 13, 2026 · 2 revisions

Composes a fresh container through the incremental ContainerBuilder API.

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.


  • Full name: \FastForward\Container\ContainerFactory
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

create

Creates and assembles a fresh container stack.

public static create(\FastForward\Config\ConfigInterface|\Psr\Container\ContainerInterface|\Interop\Container\ServiceProviderInterface|string $initializers): \FastForward\Container\ContainerInterface

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.

  • This method is static. Parameters:
Parameter Type Description
$initializers \FastForward\Config\ConfigInterface|\Psr\Container\ContainerInterface|\Interop\Container\ServiceProviderInterface|string the ordered configuration objects, containers, providers, or initializer class names

Return Value:

the composed and autowire-enabled container

Throws:

if an initializer class cannot be found or adapted


Clone this wiki locally