-
Notifications
You must be signed in to change notification settings - Fork 0
ArrayServiceProvider
Felipe Sayão Lobato Abreu edited this page Jul 3, 2025
·
2 revisions
Class ArrayServiceProvider.
A simple implementation of the ServiceProviderInterface that uses plain arrays to define service factories and extensions. This provider is suitable for static configuration and testing scenarios where no dynamic resolution is required.
Factories MUST be defined as an associative array where keys are service IDs and values are callables. Extensions MUST also follow the same format.
- Full name:
\FastForward\Container\ServiceProvider\ArrayServiceProvider
- This class is marked as final and can't be subclassed
- This class implements:
\Interop\Container\ServiceProviderInterface
- This class is a Final class
Constructs an ArrayServiceProvider with pre-defined factories and extensions.
public __construct(array<string,callable> $factories = [], array<string,callable> $extensions = []): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$factories |
array<string,callable> | the list of service factories |
$extensions |
array<string,callable> | the list of service extensions |
public getFactories(): array
public getExtensions(): array
Automatically generated on 2025-07-03