interface RegistryInterface implements ManagerRegistry
References Doctrine connections and entity managers.
| string | getDefaultEntityManagerName() Gets the default entity manager name. | |
| EntityManager | getEntityManager(string $name = null) Gets a named entity manager. | |
| array | getEntityManagers() Gets an array of all registered entity managers. | |
| EntityManager | resetEntityManager(string $name = null) Resets a named entity manager. | |
| string | getEntityNamespace(string $alias) Resolves a registered namespace alias to the full namespace. | |
| array | getEntityManagerNames() Gets all connection names. | |
| EntityManager|null | getEntityManagerForClass(string $class) Gets the entity manager associated with a given class. |
Gets the default entity manager name.
| string | The default entity manager name |
Gets a named entity manager.
| string | $name | The entity manager name (null for the default one) |
| EntityManager |
Gets an array of all registered entity managers.
| array | An array of EntityManager instances |
Resets a named entity manager.
This method is useful when an entity 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 entity manager as the existing one is not useable anymore. This means that any other object with a dependency on this entity manager will hold an obsolete reference. You can inject the registry instead to avoid this problem.
| string | $name | The entity manager name (null for the default one) |
| EntityManager |
Resolves a registered namespace alias to the full namespace.
This method looks for the alias in all registered entity managers.
| string | $alias | The alias |
| string | The full namespace |
| Configuration::getEntityNamespace |
Gets all connection names.
| array | An array of connection names |
Gets the entity manager associated with a given class.
| string | $class | A Doctrine Entity class name |
| EntityManager|null |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bridge/Doctrine/RegistryInterface.html