Doctrine\Common\Persistence\AbstractManagerRegistry::resetManager PHP Method

resetManager() public method

public resetManager ( $name = null )
    public function resetManager($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));
        }
        // force the creation of a new document manager
        // if the current one is closed
        $this->resetService($this->managers[$name]);
        return $this->getManager($name);
    }