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 | 17 | * @param string|Closure $functionName The name of the function to reflect or a closure. |
|
32 | * @param Function_ $functionNode Function node AST |
||
33 | 17 | */ |
|
34 | public function __construct($functionName, Function_ $functionNode) |
||
44 | |||
45 | 1 | /** |
|
46 | * Emulating original behaviour of reflection |
||
47 | 1 | */ |
|
48 | public function __debugInfo(): array |
||
58 | |||
59 | /** |
||
60 | * Returns an AST-node for function |
||
61 | */ |
||
62 | public function getNode(): Function_ |
||
66 | |||
67 | /** |
||
68 | * {@inheritDoc} |
||
69 | 1 | */ |
|
70 | public function getClosure() |
||
76 | |||
77 | /** |
||
78 | * {@inheritDoc} |
||
79 | 1 | */ |
|
80 | public function invoke($args = null) |
||
86 | |||
87 | /** |
||
88 | * {@inheritDoc} |
||
89 | 1 | */ |
|
90 | 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 | 1 | */ |
|
103 | public function isDisabled() |
||
107 | |||
108 | /** |
||
109 | * Returns textual representation of function |
||
110 | * |
||
111 | * @return string |
||
112 | 1 | */ |
|
113 | public function __toString() |
||
131 | |||
132 | |||
133 | /** |
||
134 | * Implementation of internal reflection initialization |
||
135 | */ |
||
136 | protected function __initialize(): void |
||
140 | } |
||
141 |