Skip to content

ContainerFactory

github-actions[bot] edited this page May 2, 2026 · 1 revision

Builds and caches the shared DevTools dependency injection container.

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.


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

Methods

create

Creates or returns the shared DevTools container instance.

public static create(): \Psr\Container\ContainerInterface
  • This method is static. Return Value:

the shared container instance


get

Resolves a service from the shared DevTools container.

public static get(string|class-string<\FastForward\DevTools\Container\T> $id): mixed|\FastForward\DevTools\Container\T
  • This method is static. Parameters:
Parameter Type Description
$id string|class-string<\FastForward\DevTools\Container\T> the service identifier

Return Value:

the resolved service


has

Returns whether the shared DevTools container can resolve a service.

public static has(string $id): bool
  • This method is static. Parameters:
Parameter Type Description
$id string the service identifier

Clone this wiki locally