*** # CallableFactory A factory that wraps a user-provided callable and executes it when invoked. The callable MUST accept a PSR-11 ContainerInterface as its first and only argument. This factory SHALL be used when the construction logic must be fully delegated to a closure. This class allows dynamic resolution of services using the container context. * Full name: `\FastForward\Container\Factory\CallableFactory` * 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 a CallableFactory instance. ```php public __construct(callable $callable): mixed ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$callable` | **callable** | a callable that returns a service instance and accepts a container | *** ### __invoke Invokes the factory to create a service. ```php public __invoke(\Psr\Container\ContainerInterface $container): mixed ``` **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `$container` | **\Psr\Container\ContainerInterface** | the PSR-11 container for dependency resolution | **Return Value:** the constructed service instance *** *** > Automatically generated on 2025-07-03