1 | <?php |
||
15 | abstract class Reflection |
||
16 | { |
||
17 | /** |
||
18 | * @type string pattern for parsing an argument type from a ReflectionParameter string |
||
19 | * |
||
20 | * @see Reflection::getParameterType() |
||
21 | */ |
||
22 | const ARG_PATTERN = '/(?:\<required\>|\<optional\>)\\s+([\\w\\\\]+)/'; |
||
23 | |||
24 | /** |
||
25 | * Create a Reflection of the function references by any type of callable (or object implementing `__invoke()`) |
||
26 | * |
||
27 | * @param callable|object $callback |
||
28 | * |
||
29 | * @return ReflectionFunctionAbstract |
||
30 | */ |
||
31 | 1 | public static function createFromCallable($callback) |
|
53 | |||
54 | /** |
||
55 | * Obtain the type-hint of a `ReflectionParameter`, but avoid triggering autoload (as a performance optimization) |
||
56 | * |
||
57 | * @param ReflectionParameter $param |
||
58 | * |
||
59 | * @return string|null fully-qualified type-name (or NULL, if no type-hint was available) |
||
60 | */ |
||
61 | 1 | public static function getParameterType(ReflectionParameter $param) |
|
77 | } |
||
78 |