1 | <?php |
||
19 | class ReflectionUtility |
||
20 | { |
||
21 | /** |
||
22 | * Create a new class reflection. Do not use the makeInstance or objectManager |
||
23 | * because the reflection API is also used in front of the caching framework. |
||
24 | * |
||
25 | * @param string $className |
||
26 | * |
||
27 | * @return ClassReflection |
||
28 | * |
||
29 | * @deprecated |
||
30 | */ |
||
31 | public static function createReflectionClass($className) |
||
35 | |||
36 | /** |
||
37 | * Check if the given class is instantiable. |
||
38 | * |
||
39 | * @param string $className |
||
40 | * |
||
41 | * @return bool |
||
42 | */ |
||
43 | public static function isInstantiable($className): bool |
||
54 | |||
55 | /** |
||
56 | * Get the name of the parent class. |
||
57 | * |
||
58 | * @param string $className |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | public static function getParentClassName($className) |
||
74 | |||
75 | /** |
||
76 | * Get first class tag information. |
||
77 | * The trimmed value if the tag exists and FALSE if the tag do not exists. |
||
78 | * |
||
79 | * @param string $className |
||
80 | * @param string $tag |
||
81 | * |
||
82 | * @return string|bool |
||
83 | */ |
||
84 | public static function getFirstTagValue(string $className, string $tag) |
||
108 | |||
109 | /** |
||
110 | * Get the tag configuration from this method and respect multiple line and space configuration. |
||
111 | * |
||
112 | * @param string $className |
||
113 | * @param $methodName |
||
114 | * @param array $tagNames |
||
115 | * |
||
116 | * @return array |
||
117 | */ |
||
118 | public static function getTagConfigurationForMethod($className, $methodName, array $tagNames): array |
||
139 | |||
140 | /** |
||
141 | * Get the tag configuration from this method and respect multiple line and space configuration. |
||
142 | * |
||
143 | * @param string $className |
||
144 | * @param array $tagNames |
||
145 | * |
||
146 | * @return array |
||
147 | */ |
||
148 | public static function getTagConfigurationForClass(string $className, array $tagNames): array |
||
169 | |||
170 | /** |
||
171 | * Get the tag configuration from this method and respect multiple line and space configuration. |
||
172 | * |
||
173 | * @param string $className |
||
174 | * @param string $property |
||
175 | * @param array $tagNames |
||
176 | * |
||
177 | * @return array |
||
178 | */ |
||
179 | public static function getTagConfigurationForProperty(string $className, string $property, array $tagNames): array |
||
197 | |||
198 | /** |
||
199 | * Get public method names. |
||
200 | * |
||
201 | * @param string $className |
||
202 | * |
||
203 | * @return array |
||
204 | */ |
||
205 | public static function getPropertyNames(string $className): array |
||
211 | |||
212 | /** |
||
213 | * @param string $className |
||
214 | * @param string $tag |
||
215 | * |
||
216 | * @throws \ReflectionException |
||
217 | * @return array |
||
218 | */ |
||
219 | public static function getPropertiesTaggedWith(string $className, string $tag): array |
||
232 | |||
233 | /** |
||
234 | * Get public method names. |
||
235 | * |
||
236 | * @param string $className |
||
237 | * |
||
238 | * @return array |
||
239 | */ |
||
240 | public static function getPublicMethodNames(string $className): array |
||
265 | |||
266 | /** |
||
267 | * Get properties of the given class, that are als declared in the given class. |
||
268 | * |
||
269 | * @param string $className |
||
270 | * |
||
271 | * @return array |
||
272 | */ |
||
273 | public static function getDeclaringProperties(string $className) |
||
284 | |||
285 | /** |
||
286 | * Is 9 or higher. |
||
287 | * |
||
288 | * @return bool |
||
289 | */ |
||
290 | public static function is9orHigher(): bool |
||
294 | |||
295 | /** |
||
296 | * Create reflection service |
||
297 | * |
||
298 | * @return ReflectionService |
||
299 | */ |
||
300 | protected static function getReflectionService() |
||
305 | } |
||
306 |
This method has been deprecated.