1 | <?php |
||
25 | abstract class AbstractMethodInvocation extends AbstractInvocation implements MethodInvocation |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * Instance of object for invoking |
||
30 | * |
||
31 | * @var object|null |
||
32 | */ |
||
33 | protected $instance; |
||
34 | |||
35 | /** |
||
36 | * Instance of reflection method for class |
||
37 | * |
||
38 | * @var ReflectionMethod |
||
39 | */ |
||
40 | protected $reflectionMethod; |
||
41 | |||
42 | /** |
||
43 | * Class name scope for static invocation |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $scope; |
||
48 | |||
49 | /** |
||
50 | * Constructor for method invocation |
||
51 | 24 | * |
|
52 | * @param array $advices List of advices for this invocation |
||
53 | 24 | */ |
|
54 | 24 | public function __construct(string $className, string $methodName, array $advices) |
|
64 | |||
65 | /** |
||
66 | * Invokes current method invocation with all interceptors |
||
67 | * |
||
68 | * @param null|object|string $instance Invocation instance (class name for static methods) |
||
69 | * @param array $arguments List of arguments for method invocation |
||
70 | * @param array $variadicArguments Additional list of variadic arguments |
||
71 | * |
||
72 | 20 | * @return mixed Result of invocation |
|
73 | */ |
||
74 | 20 | final public function __invoke($instance = null, array $arguments = [], array $variadicArguments = []) |
|
110 | |||
111 | /** |
||
112 | * Gets the method being called. |
||
113 | * |
||
114 | * @return ReflectionMethod|AnnotatedReflectionMethod the method being called. |
||
115 | */ |
||
116 | public function getMethod(): ReflectionMethod |
||
120 | |||
121 | /** |
||
122 | * Returns friendly description of this joinpoint |
||
123 | */ |
||
124 | final public function __toString(): string |
||
133 | } |
||
134 |