Repository navigation
AutowireContainer
Resolves services through an optional delegate and native constructor autowiring.
Explicit delegate entries take precedence over autowiring. Without a delegate, an empty aggregate is created to resolve concrete dependency graphs directly.
- Full name:
\FastForward\Container\AutowireContainer - This class is marked as final and can't be subclassed
- This class implements:
\FastForward\Container\ContainerInterface - This class is a Final class
Constructs the AutowireContainer.
public __construct(\Psr\Container\ContainerInterface|null $delegateContainer = null): mixedOmission or null creates an empty AggregateContainer. An existing aggregate is reused; other PSR-11 containers are wrapped. Autowiring is appended last so delegate entries take precedence, including for nested dependencies.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$delegateContainer |
\Psr\Container\ContainerInterface|null | the optional delegate to wrap and extend |
Retrieves an entry from the container by its identifier.
public get(string $id): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | identifier of the entry to retrieve |
Return Value:
the resolved entry
Throws:
if the identifier is not found
-
NotFoundExceptionInterfaceif the entry cannot be resolved ContainerExceptionInterface
Checks whether the composed container knows the entry without calling get().
public has(string $id): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$id |
string | the entry identifier |
Return Value:
whether an entry or instantiable class is known
Throws:
if delegated lookup or class loading fails