1 | <?php |
||
21 | class ReflectionFunctionInvocation extends AbstractInvocation implements FunctionInvocation |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Instance of reflection function |
||
26 | * |
||
27 | * @var ReflectionFunction |
||
28 | */ |
||
29 | protected $reflectionFunction; |
||
30 | |||
31 | /** |
||
32 | * Constructor for function invocation |
||
33 | * |
||
34 | * @param array $advices List of advices for this invocation |
||
35 | * |
||
36 | * @throws \ReflectionException |
||
37 | */ |
||
38 | public function __construct(string $functionName, array $advices) |
||
43 | |||
44 | /** |
||
45 | * Invokes original function and return result from it |
||
46 | * |
||
47 | * @return mixed |
||
48 | */ |
||
49 | public function proceed() |
||
59 | |||
60 | /** |
||
61 | * Gets the function being called. |
||
62 | */ |
||
63 | public function getFunction(): ReflectionFunction |
||
67 | |||
68 | /** |
||
69 | * Invokes current function invocation with all interceptors |
||
70 | * |
||
71 | * @param array $arguments List of arguments for function invocation |
||
72 | * @param array $variadicArguments Additional list of variadic arguments |
||
73 | * |
||
74 | * @return mixed Result of invocation |
||
75 | */ |
||
76 | final public function __invoke(array $arguments = [], array $variadicArguments = []) |
||
103 | |||
104 | /** |
||
105 | * Returns a friendly description of current joinpoint |
||
106 | */ |
||
107 | final public function __toString(): string |
||
114 | } |
||
115 |