getRepository() public method

Gets the EntityRepository for an entity.
public getRepository ( string $entityName, $entityManagerName = null ) : Doctrine\ORM\EntityRepository
$entityName string The name of the entity.
return Doctrine\ORM\EntityRepository
 /**
  * Return de Repository
  *
  * @return Doctrine\ORM\EntityRepository
  */
 public function getRepository()
 {
     if (null === $this->generator) {
         throw new \Exception('Can\'t instatiate a Doctrine Repository without Generator Class');
     } else {
         return $this->doctrineRegistry->getRepository($this->generator->model);
     }
 }