|
@@ -108,19 +108,6 @@ 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 = null)
|
|
|
- {
|
|
|
- return $this->getEntityManager($entityManagerName)->getRepository($entityName);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Resets a named entity manager.
|
|
|
*
|
|
@@ -185,4 +172,18 @@ class Registry
|
|
|
{
|
|
|
return $this->entityManagers;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Gets 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 = null)
|
|
|
+ {
|
|
|
+ return $this->getEntityManager($entityManagerName)->getRepository($entityName);
|
|
|
+ }
|
|
|
}
|