Bisna\Doctrine\Container::getDocumentManager PHP Method

getDocumentManager() public method

If ODM DocumentManager name could not be found, NameNotFoundException is thrown.
public getDocumentManager ( string $dmName = null ) : DocumentManager
$dmName string Optional ODM DocumentManager name
return Doctrine\ODM\MongoDB\DocumentManager
    public function getDocumentManager($dmName = null)
    {
        $dmName = $dmName ?: $this->defaultDocumentManager;
        // Check if ORM Entity Manager has not yet been initialized
        if (!isset($this->documentManagers[$dmName])) {
            // Check if ORM EntityManager is configured
            if (!isset($this->configuration['odm'][$dmName])) {
                throw new \Core\Application\Exception\NameNotFoundException("Unable to find Doctrine ODM DocumentManager '{$dmName}'.");
            }
            $this->documentManagers[$dmName] = $this->startODMDocumentManager($this->configuration['odm'][$dmName]);
            unset($this->configuration['odm'][$dmName]);
        }
        return $this->documentManagers[$dmName];
    }