public function ManagerRegistry::resetManager in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php \Doctrine\Common\Persistence\ManagerRegistry::resetManager()
Resets a named object manager.
This method is useful when an object manager has been closed because of a rollbacked transaction AND when you think that it makes sense to get a new one to replace the closed one.
Be warned that you will get a brand new object manager as the existing one is not useable anymore. This means that any other object with a dependency on this object manager will hold an obsolete reference. You can inject the registry instead to avoid this problem.
Parameters
string|null $name The object manager name (null for the default one).:
Return value
\Doctrine\Common\Persistence\ObjectManager
1 method overrides ManagerRegistry::resetManager()
- AbstractManagerRegistry::resetManager in vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ AbstractManagerRegistry.php - Resets a named object manager.
File
- vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ ManagerRegistry.php, line 73
Class
- ManagerRegistry
- Contract covering object managers for a Doctrine persistence layer ManagerRegistry class to implement.
Namespace
Doctrine\Common\PersistenceCode
public function resetManager($name = null);