*** # ServiceFactory 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. * Full name: `\FastForward\Container\Factory\ServiceFactory` * This class is marked as **final** and can't be subclassed * This class implements: [`\FastForward\Container\Factory\FactoryInterface`](./FactoryInterface.md) * This class is a **Final class** ## Methods ### __construct Constructs the factory with a fixed service instance. ```php public __construct(mixed $service): mixed ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$service` | **mixed** | the service instance to be returned by the factory | *** ### __invoke Returns the fixed service instance. ```php public __invoke(\Psr\Container\ContainerInterface $container): mixed ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$container` | **\Psr\Container\ContainerInterface** | the container instance (ignored in this context) | **Return Value:** the predefined service instance *** *** > Automatically generated on 2025-07-03