src/IlluminateRegistry.php
public function getManager($name = null)
    {
        $name = $name ?: $this->getDefaultManagerName();

        if (!$this->managerExists($name)) {
            throw new InvalidArgumentException(sprintf('Doctrine Manager named "%s" does not exist.', $name));
        }

        if (isset($this->managersMap[$name])) {
            return $this->managersMap[$name];
        }

        return $this->managersMap[$name] = $this->getService(
            $this->getManagerBindingName($this->managers[$name])
        );
    }
public function getManager($name = null)
    {
        $name = $name ?: $this->getDefaultManagerName();

        if (!$this->managerExists($name)) {
            throw new InvalidArgumentException(sprintf('Doctrine Manager named "%s" does not exist.', $name));
        }

        if (isset($this->managersMap[$name])) {
            return $this->managersMap[$name];
        }

        return $this->managersMap[$name] = $this->getService(
            $this->getManagerBindingName($this->managers[$name])
        );
    }
public function getManager ( $ name = null ) { $ name = $ name ? : $ this -> getDefaultManagerName ( ) ; if ( ! $ this -> managerExists ( $ name ) ) { throw new InvalidArgumentException ( sprintf ( 'Doctrine Manager named "%s" does not exist.' , $ name ) ) ; } if ( isset ( $ this -> managersMap [ $ name ] ) ) { return $ this -> managersMap [ $ name ] ; } return $ this -> managersMap [ $ name ] = $ this -> getService ( $ this -> getManagerBindingName ( $ this -> managers [ $ name ] ) ) ; }
Gets a named object manager.

@param string $name The object manager name (null for the default one).

@return \Doctrine\Common\Persistence\ObjectManager
Gets a named object manager .