1 | <?php |
||
28 | class Registry extends ManagerRegistry implements RegistryInterface |
||
29 | { |
||
30 | /** |
||
31 | * Construct. |
||
32 | * |
||
33 | * @param ContainerInterface $container |
||
34 | * @param array $connections |
||
35 | * @param array $entityManagers |
||
36 | * @param string $defaultConnection |
||
37 | * @param string $defaultEntityManager |
||
38 | */ |
||
39 | public function __construct(ContainerInterface $container, array $connections, array $entityManagers, $defaultConnection, $defaultEntityManager) |
||
45 | |||
46 | /** |
||
47 | * Gets the default entity manager name. |
||
48 | * |
||
49 | * @return string The default entity manager name |
||
50 | * |
||
51 | * @deprecated |
||
52 | */ |
||
53 | public function getDefaultEntityManagerName() |
||
59 | |||
60 | /** |
||
61 | * Gets a named entity manager. |
||
62 | * |
||
63 | * @param string $name The entity manager name (null for the default one) |
||
64 | * |
||
65 | * @return EntityManager |
||
66 | * |
||
67 | * @deprecated |
||
68 | */ |
||
69 | public function getEntityManager($name = null) |
||
75 | |||
76 | /** |
||
77 | * Gets an array of all registered entity managers |
||
78 | * |
||
79 | * @return EntityManager[] an array of all EntityManager instances |
||
80 | * |
||
81 | * @deprecated |
||
82 | */ |
||
83 | public function getEntityManagers() |
||
89 | |||
90 | /** |
||
91 | * Resets a named entity manager. |
||
92 | * |
||
93 | * This method is useful when an entity manager has been closed |
||
94 | * because of a rollbacked transaction AND when you think that |
||
95 | * it makes sense to get a new one to replace the closed one. |
||
96 | * |
||
97 | * Be warned that you will get a brand new entity manager as |
||
98 | * the existing one is not usable anymore. This means that any |
||
99 | * other object with a dependency on this entity manager will |
||
100 | * hold an obsolete reference. You can inject the registry instead |
||
101 | * to avoid this problem. |
||
102 | * |
||
103 | * @param string $name The entity manager name (null for the default one) |
||
104 | * |
||
105 | * @return EntityManager |
||
106 | * |
||
107 | * @deprecated |
||
108 | */ |
||
109 | public function resetEntityManager($name = null) |
||
115 | |||
116 | /** |
||
117 | * Resolves a registered namespace alias to the full namespace. |
||
118 | * |
||
119 | * This method looks for the alias in all registered entity managers. |
||
120 | * |
||
121 | * @param string $alias The alias |
||
122 | * |
||
123 | * @return string The full namespace |
||
124 | * |
||
125 | * @deprecated |
||
126 | */ |
||
127 | public function getEntityNamespace($alias) |
||
133 | |||
134 | /** |
||
135 | * Resolves a registered namespace alias to the full namespace. |
||
136 | * |
||
137 | * This method looks for the alias in all registered entity managers. |
||
138 | * |
||
139 | * @param string $alias The alias |
||
140 | * |
||
141 | * @return string The full namespace |
||
142 | * |
||
143 | * @see Configuration::getEntityNamespace |
||
144 | */ |
||
145 | public function getAliasNamespace($alias) |
||
156 | |||
157 | /** |
||
158 | * Gets all connection names. |
||
159 | * |
||
160 | * @return array An array of connection names |
||
161 | * |
||
162 | * @deprecated |
||
163 | */ |
||
164 | public function getEntityManagerNames() |
||
170 | |||
171 | /** |
||
172 | * Gets the entity manager associated with a given class. |
||
173 | * |
||
174 | * @param string $class A Doctrine Entity class name |
||
175 | * |
||
176 | * @return EntityManager|null |
||
177 | * |
||
178 | * @deprecated |
||
179 | */ |
||
180 | public function getEntityManagerForClass($class) |
||
186 | } |
||
187 |
If you suppress an error, we recommend checking for the error condition explicitly: