* @since 1.0.0 */ class EntityRepositoryFactory { /** * @var Doctrine\ORM\EntityManager */ protected $em; public function __construct(EntityManager $em) { $this->em = $em; } /** * Creates the repository using entity manager */ public function create(string $class) : EntityRepository { return $this->em->getRepository($class); } }