Permalink
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (37 sloc) 769 Bytes
<?php
declare(strict_types=1);
namespace Doctrine\ORM\Tools\Console\Helper;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Helper\Helper;
/**
* Doctrine CLI Connection Helper.
*/
class EntityManagerHelper extends Helper
{
/**
* Doctrine ORM EntityManagerInterface.
*
* @var EntityManagerInterface
*/
protected $em;
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
/**
* Retrieves Doctrine ORM EntityManager.
*
* @return EntityManagerInterface
*/
public function getEntityManager()
{
return $this->em;
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'entityManager';
}
}