public function AbstractManagerRegistry::getManager in Plug 7
Throws
\InvalidArgumentException
Overrides ManagerRegistry::getManager
File
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ AbstractManagerRegistry.php, line 173
Class
- AbstractManagerRegistry
- Abstract implementation of the ManagerRegistry contract.
Namespace
Doctrine\Common\PersistenceCode
public function getManager($name = null) {
if (null === $name) {
$name = $this->defaultManager;
}
if (!isset($this->managers[$name])) {
throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name));
}
return $this
->getService($this->managers[$name]);
}