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 |
||
201 | |||
202 | /** |
||
203 | * Get public method names. |
||
204 | * |
||
205 | * @param string $className |
||
206 | * |
||
207 | * @return array |
||
208 | */ |
||
209 | public static function getPropertyNames(string $className): array |
||
215 | |||
216 | /** |
||
217 | * @param string $className |
||
218 | * @param string $tag |
||
219 | * |
||
220 | * @throws \ReflectionException |
||
221 | * @return array |
||
222 | */ |
||
223 | public static function getPropertiesTaggedWith(string $className, string $tag): array |
||
236 | |||
237 | /** |
||
238 | * Get public method names. |
||
239 | * |
||
240 | * @param string $className |
||
241 | * |
||
242 | * @return array |
||
243 | */ |
||
244 | public static function getPublicMethodNames(string $className): array |
||
269 | |||
270 | /** |
||
271 | * Get properties of the given class, that are als declared in the given class. |
||
272 | * |
||
273 | * @param string $className |
||
274 | * |
||
275 | * @return array |
||
276 | */ |
||
277 | public static function getDeclaringProperties(string $className) |
||
288 | |||
289 | /** |
||
290 | * Is 9 or higher. |
||
291 | * |
||
292 | * @return bool |
||
293 | */ |
||
294 | public static function is9orHigher(): bool |
||
298 | |||
299 | /** |
||
300 | * Create reflection service |
||
301 | * |
||
302 | * @return ReflectionService |
||
303 | */ |
||
304 | protected static function getReflectionService() |
||
309 | |||
310 | /** |
||
311 | * Check if the method is tagged with the given tag (no value checked) |
||
312 | * |
||
313 | * @param string $controllerName |
||
314 | * @param string $methodName |
||
315 | * @param string $tagName |
||
316 | * @return bool |
||
317 | */ |
||
318 | public static function isMethodTaggedWith($className, $methodName, $tagName): bool |
||
324 | } |
||
325 |
This method has been deprecated.