|
@@ -108,6 +108,19 @@ class Registry
|
|
|
return $this->container->get($this->entityManagers[$name]);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Shortcut method to return the EntityRepository for an entity.
|
|
|
+ *
|
|
|
+ * @param string $entityName The name of the entity.
|
|
|
+ * @param string $entityManagerNAme The entity manager name (null for the default one)
|
|
|
+ * @return Doctrine\ORM\EntityRepository
|
|
|
+ */
|
|
|
+ public function getRepository($entityName, $entityManagerName)
|
|
|
+ {
|
|
|
+ return $this->getEntityManager($entityManagerName)
|
|
|
+ ->getRespository($entityName);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Resets a named entity manager.
|
|
|
*
|