This factory wraps a predefined service instance and returns it directly upon invocation.
It SHALL be used when a fixed service object must be registered in a container using a factory interface.
The returned value MUST be the exact same instance provided at construction.
This ensures immutability and predictable resolution.
\FastForward\Container\Factory\ServiceFactory
\FastForward\Container\Factory\FactoryInterface
Constructs the factory with a fixed service instance.
public __construct(mixed $service): mixed
Parameters:
$service
Returns the fixed service instance.
public __invoke(\Psr\Container\ContainerInterface $container): mixed
$container
Return Value:
the predefined service instance
There was an error while loading. Please reload this page.