-
Notifications
You must be signed in to change notification settings - Fork 0
AggregateServiceProvider
Aggregates multiple service providers into a single provider.
This class MUST be used to compose a unified list of factories and extensions from several ServiceProviderInterface implementations.
Factories and extensions returned by this class are merged in registration order.
- Full name:
\FastForward\Container\ServiceProvider\AggregateServiceProvider
- This class implements:
\Interop\Container\ServiceProviderInterface
Constructs the AggregateServiceProvider.
public __construct(\Interop\Container\ServiceProviderInterface $serviceProviders): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$serviceProviders |
\Interop\Container\ServiceProviderInterface | One or more service providers to aggregate. |
Retrieves all service factories from aggregated providers.
public getFactories(): array<string,callable>
This method merges the factories from each service provider into a single array. The factory for this class itself is added under the key of its class name.
Return Value:
an associative array of service factories
Retrieves all service extensions from aggregated providers.
public getExtensions(): array<string,callable>
This method merges extensions from each provider. If multiple extensions exist for the same service ID, they are composed in the order they are added using nested closures.
Return Value:
an associative array of service extensions
Throws:
if any extension is not callable
Automatically generated on 2025-07-03