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 | * |
||
222 | * @return array |
||
223 | */ |
||
224 | public static function getPropertiesTaggedWith(string $className, string $tag): array |
||
238 | |||
239 | /** |
||
240 | * Get public method names. |
||
241 | * |
||
242 | * @param string $className |
||
243 | * |
||
244 | * @return array |
||
245 | */ |
||
246 | public static function getPublicMethodNames(string $className): array |
||
271 | |||
272 | /** |
||
273 | * Get properties of the given class, that are als declared in the given class. |
||
274 | * |
||
275 | * @param string $className |
||
276 | * |
||
277 | * @return array |
||
278 | */ |
||
279 | public static function getDeclaringProperties(string $className) |
||
290 | |||
291 | /** |
||
292 | * Is 9 or higher. |
||
293 | * |
||
294 | * @return bool |
||
295 | */ |
||
296 | public static function is9orHigher(): bool |
||
300 | |||
301 | /** |
||
302 | * Check if the method is tagged with the given tag (no value checked). |
||
303 | * |
||
304 | * @param string $className |
||
305 | * @param string $methodName |
||
306 | * @param string $tagName |
||
307 | * |
||
308 | * @return bool |
||
309 | */ |
||
310 | public static function isMethodTaggedWith($className, $methodName, $tagName): bool |
||
317 | |||
318 | /** |
||
319 | * Check if the property is tagged with the given tag (no value checked). |
||
320 | * |
||
321 | * @param string $className |
||
322 | * @param string $propertyName |
||
323 | * @param string $tagName |
||
324 | * |
||
325 | * @return bool |
||
326 | */ |
||
327 | public static function isPropertyTaggedWith($className, $propertyName, $tagName): bool |
||
333 | |||
334 | /** |
||
335 | * Create reflection service. |
||
336 | * |
||
337 | * @return ReflectionService |
||
338 | */ |
||
339 | protected static function getReflectionService() |
||
345 | } |
||
346 |
This method has been deprecated.