for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace OSS\CoreBundle\Command;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityRepository;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
abstract class BaseCommand extends ContainerAwareCommand
{
/**
* @return EntityManager
*/
protected function getEntityManager()
return $this->getContainer()->get('doctrine.orm.entity_manager');
}
* @return EntityRepository
protected function getGameDateRepository()
return $this->getEntityManager()->getRepository('CoreBundle:GameDate');