use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Factory\FactoryInterface;
class Factory implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)
{
$reportingCloud = $container->get('ReportingCloud');
// instantiate and return your object here
}
}
$this->reportingCloud(); // returns a \TextControl\ReportingCloud\ReportingCloud instance
$this->reportingCloud(); // returns a \TextControl\ReportingCloud\ReportingCloud instance