1 | <?php |
||
23 | class ReflectionFunction extends BaseReflectionFunction |
||
24 | { |
||
25 | use InternalPropertiesEmulationTrait; |
||
26 | use ReflectionFunctionLikeTrait; |
||
27 | |||
28 | /** |
||
29 | * Initializes reflection instance for given AST-node |
||
30 | * |
||
31 | * @param string|Closure $functionName The name of the function to reflect or a closure. |
||
32 | * @param Function_ $functionNode Function node AST |
||
33 | */ |
||
34 | 17 | public function __construct($functionName, Function_ $functionNode) |
|
44 | |||
45 | /** |
||
46 | * Emulating original behaviour of reflection |
||
47 | */ |
||
48 | 1 | public function __debugInfo(): array |
|
58 | |||
59 | /** |
||
60 | * Returns an AST-node for function |
||
61 | */ |
||
62 | public function getNode(): Function_ |
||
66 | |||
67 | /** |
||
68 | * {@inheritDoc} |
||
69 | */ |
||
70 | 1 | public function getClosure() |
|
76 | |||
77 | /** |
||
78 | * {@inheritDoc} |
||
79 | */ |
||
80 | 1 | public function invoke($args = null) |
|
86 | |||
87 | /** |
||
88 | * {@inheritDoc} |
||
89 | */ |
||
90 | 1 | public function invokeArgs(array $args) |
|
96 | |||
97 | /** |
||
98 | * Checks if function is disabled |
||
99 | * |
||
100 | * Only internal functions can be disabled using disable_functions directive. |
||
101 | * User-defined functions are unaffected. |
||
102 | */ |
||
103 | 1 | public function isDisabled() |
|
107 | |||
108 | /** |
||
109 | * Returns textual representation of function |
||
110 | * |
||
111 | * @return string |
||
112 | */ |
||
113 | 1 | public function __toString() |
|
131 | |||
132 | |||
133 | /** |
||
134 | * Implementation of internal reflection initialization |
||
135 | */ |
||
136 | 4 | protected function __initialize(): void |
|
140 | } |
||
141 |