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

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

        // force the creation of a new document manager
        // if the current one is closed
        $this->resetService(
            $this->getManagerBindingName($this->managers[$name])
        );

        $this->resetService(
            $this->getConnectionBindingName($this->connections[$name])
        );

        unset($this->managersMap[$name]);
        unset($this->connectionsMap[$name]);
    }
public function closeManager($name = null)
    {
        $name = $name ?: $this->getDefaultManagerName();

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

        // force the creation of a new document manager
        // if the current one is closed
        $this->resetService(
            $this->getManagerBindingName($this->managers[$name])
        );

        $this->resetService(
            $this->getConnectionBindingName($this->connections[$name])
        );

        unset($this->managersMap[$name]);
        unset($this->connectionsMap[$name]);
    }
public function closeManager ( $ name = null ) { $ name = $ name ? : $ this -> getDefaultManagerName ( ) ; if ( ! $ this -> managerExists ( $ name ) ) { throw new InvalidArgumentException ( sprintf ( 'Doctrine Manager named "%s" does not exist.' , $ name ) ) ; } // force the creation of a new document manager // if the current one is closed $ this -> resetService ( $ this -> getManagerBindingName ( $ this -> managers [ $ name ] ) ) ; $ this -> resetService ( $ this -> getConnectionBindingName ( $ this -> connections [ $ name ] ) ) ; unset ( $ this -> managersMap [ $ name ] ) ; unset ( $ this -> connectionsMap [ $ name ] ) ; }
Close an existing object manager.
@param string|null $name The object manager name (null for the default one).
Close an existing object manager .