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