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 all properties that are tagged with the given tag. |
||
76 | * |
||
77 | * @param string $className |
||
78 | * @param string $tag |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | public static function getPropertyNamesTaggedWith($className, $tag): array |
||
95 | |||
96 | /** |
||
97 | * Get first class tag information. |
||
98 | * The trimmed value if the tag exists and FALSE if the tag do not exists. |
||
99 | * |
||
100 | * @param string $className |
||
101 | * @param string $tag |
||
102 | * |
||
103 | * @return string|bool |
||
104 | */ |
||
105 | public static function getFirstTagValue(string $className, string $tag) |
||
129 | |||
130 | /** |
||
131 | * Get the tag configuration from this method and respect multiple line and space configuration. |
||
132 | * |
||
133 | * @param string $className |
||
134 | * @param $methodName |
||
135 | * @param array $tagNames |
||
136 | * |
||
137 | * @return array |
||
138 | */ |
||
139 | public static function getTagConfigurationForMethod($className, $methodName, array $tagNames): array |
||
160 | |||
161 | /** |
||
162 | * Get the tag configuration from this method and respect multiple line and space configuration. |
||
163 | * |
||
164 | * @param string $className |
||
165 | * @param array $tagNames |
||
166 | * |
||
167 | * @return array |
||
168 | */ |
||
169 | public static function getTagConfigurationForClass(string $className, array $tagNames): array |
||
190 | |||
191 | /** |
||
192 | * Get the tag configuration from this method and respect multiple line and space configuration. |
||
193 | * |
||
194 | * @param string $className |
||
195 | * @param string $property |
||
196 | * @param array $tagNames |
||
197 | * |
||
198 | * @return array |
||
199 | */ |
||
200 | public static function getTagConfigurationForProperty(string $className, string $property, array $tagNames): array |
||
221 | |||
222 | /** |
||
223 | * Get public method names. |
||
224 | * |
||
225 | * @param string $className |
||
226 | * |
||
227 | * @return array |
||
228 | */ |
||
229 | public static function getPropertyNames(string $className): array |
||
235 | |||
236 | /** |
||
237 | * @param string $className |
||
238 | * @param string $tag |
||
239 | * |
||
240 | * @throws \ReflectionException |
||
241 | * @return array |
||
242 | */ |
||
243 | public static function getPropertiesTaggedWith(string $className, string $tag): array |
||
256 | |||
257 | /** |
||
258 | * Get public method names. |
||
259 | * |
||
260 | * @param string $className |
||
261 | * |
||
262 | * @return array |
||
263 | */ |
||
264 | public static function getPublicMethodNames(string $className): array |
||
289 | |||
290 | /** |
||
291 | * Get properties of the given class, that are als declared in the given class. |
||
292 | * |
||
293 | * @param string $className |
||
294 | * |
||
295 | * @return array |
||
296 | */ |
||
297 | public static function getDeclaringProperties($className) |
||
308 | |||
309 | /** |
||
310 | * Is 9 or higher. |
||
311 | * |
||
312 | * @return bool |
||
313 | */ |
||
314 | public static function is9orHigher(): bool |
||
318 | } |
||
319 |
This method has been deprecated.