1 | <?php |
||
14 | class Registry extends ManagerRegistry implements RegistryInterface |
||
15 | { |
||
16 | /** |
||
17 | * @param string[] $connections |
||
18 | * @param string[] $entityManagers |
||
19 | * @param string $defaultConnection |
||
20 | * @param string $defaultEntityManager |
||
21 | */ |
||
22 | public function __construct(ContainerInterface $container, array $connections, array $entityManagers, $defaultConnection, $defaultEntityManager) |
||
28 | |||
29 | /** |
||
30 | * Gets the default entity manager name. |
||
31 | * |
||
32 | * @deprecated |
||
33 | * |
||
34 | * @return string The default entity manager name |
||
35 | */ |
||
36 | public function getDefaultEntityManagerName() |
||
42 | |||
43 | /** |
||
44 | * Gets a named entity manager. |
||
45 | * |
||
46 | * @deprecated |
||
47 | * |
||
48 | * @param string $name The entity manager name (null for the default one) |
||
49 | * |
||
50 | * @return EntityManager |
||
51 | */ |
||
52 | public function getEntityManager($name = null) |
||
58 | |||
59 | /** |
||
60 | * Gets an array of all registered entity managers |
||
61 | * |
||
62 | * @deprecated |
||
63 | * |
||
64 | * @return EntityManager[] an array of all EntityManager instances |
||
65 | */ |
||
66 | public function getEntityManagers() |
||
72 | |||
73 | /** |
||
74 | * Resets a named entity manager. |
||
75 | * |
||
76 | * This method is useful when an entity manager has been closed |
||
77 | * because of a rollbacked transaction AND when you think that |
||
78 | * it makes sense to get a new one to replace the closed one. |
||
79 | * |
||
80 | * Be warned that you will get a brand new entity manager as |
||
81 | * the existing one is not usable anymore. This means that any |
||
82 | * other object with a dependency on this entity manager will |
||
83 | * hold an obsolete reference. You can inject the registry instead |
||
84 | * to avoid this problem. |
||
85 | * |
||
86 | * @deprecated |
||
87 | * |
||
88 | * @param string $name The entity manager name (null for the default one) |
||
89 | */ |
||
90 | public function resetEntityManager($name = null) |
||
96 | |||
97 | /** |
||
98 | * Resolves a registered namespace alias to the full namespace. |
||
99 | * |
||
100 | * This method looks for the alias in all registered entity managers. |
||
101 | * |
||
102 | * @deprecated |
||
103 | * |
||
104 | * @param string $alias The alias |
||
105 | * |
||
106 | * @return string The full namespace |
||
107 | */ |
||
108 | public function getEntityNamespace($alias) |
||
114 | |||
115 | /** |
||
116 | * Resolves a registered namespace alias to the full namespace. |
||
117 | * |
||
118 | * This method looks for the alias in all registered entity managers. |
||
119 | * |
||
120 | * @see Configuration::getEntityNamespace |
||
121 | * |
||
122 | * @param string $alias The alias |
||
123 | * |
||
124 | * @return string The full namespace |
||
125 | */ |
||
126 | public function getAliasNamespace($alias) |
||
137 | |||
138 | /** |
||
139 | * Gets all connection names. |
||
140 | * |
||
141 | * @deprecated |
||
142 | * |
||
143 | * @return string[] An array of connection names |
||
144 | */ |
||
145 | public function getEntityManagerNames() |
||
151 | |||
152 | /** |
||
153 | * Gets the entity manager associated with a given class. |
||
154 | * |
||
155 | * @deprecated |
||
156 | * |
||
157 | * @param string $class A Doctrine Entity class name |
||
158 | * |
||
159 | * @return EntityManager|null |
||
160 | */ |
||
161 | public function getEntityManagerForClass($class) |
||
167 | } |
||
168 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.