for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace JhUser\Repository\Factory;
use JhUser\Repository\UserRepository;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
/**
* Class UserRepositoryFactory
* @package JhUser\Repository\Factory
* @author Aydin Hassan <[email protected]>
*/
class UserRepositoryFactory implements FactoryInterface
{
* @param ServiceLocatorInterface $serviceLocator
* @return UserRepository
public function createService(ServiceLocatorInterface $serviceLocator)
return new UserRepository(
$serviceLocator->get('JhUser\ObjectManager')->getRepository('JhUser\Entity\User')
);
}