for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LmcUser\Factory\Service;
use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use LmcUser\Service\User;
class UserFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $serviceLocator, $requestedName, array $options = null)
$service = new User();
$service->setServiceManager($serviceLocator);
return $service;
}
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return mixed
*/
public function createService(ServiceLocatorInterface $serviceLocator)
return $this->__invoke($serviceLocator, null);