1 | <?php |
||
20 | class ReflectionFunctionInvocation extends AbstractInvocation implements FunctionInvocation |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * Instance of reflection function |
||
25 | * |
||
26 | * @var null|ReflectionFunction |
||
27 | */ |
||
28 | protected $reflectionFunction = null; |
||
29 | |||
30 | /** |
||
31 | * Constructor for function invocation |
||
32 | * |
||
33 | * @param string $functionName Function to invoke |
||
34 | * @param $advices array List of advices for this invocation |
||
35 | */ |
||
36 | public function __construct($functionName, array $advices) |
||
41 | |||
42 | /** |
||
43 | * Invokes original function and return result from it |
||
44 | * |
||
45 | * @return mixed |
||
46 | */ |
||
47 | public function proceed() |
||
58 | |||
59 | /** |
||
60 | * Gets the function being called. |
||
61 | * |
||
62 | * @return ReflectionFunction the method being called. |
||
63 | */ |
||
64 | public function getFunction() |
||
68 | |||
69 | /** |
||
70 | * Returns the object that holds the current joinpoint's static |
||
71 | * part. |
||
72 | * |
||
73 | * @return object|null the object (can be null if the accessible object is |
||
74 | * static). |
||
75 | */ |
||
76 | public function getThis() |
||
80 | |||
81 | /** |
||
82 | * Returns the static part of this joinpoint. |
||
83 | * |
||
84 | * @return object |
||
85 | */ |
||
86 | public function getStaticPart() |
||
90 | |||
91 | /** |
||
92 | * Invokes current function invocation with all interceptors |
||
93 | * |
||
94 | * @param array $arguments Arguments for the invocation |
||
95 | * |
||
96 | * @return mixed |
||
97 | */ |
||
98 | final public function __invoke(array $arguments = []) |
||
119 | |||
120 | /** |
||
121 | * Returns a friendly description of current joinpoint |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | final public function __toString() |
||
132 | } |
||
133 |