1 | <?php |
||
19 | final class DynamicClosureMethodInvocation extends AbstractMethodInvocation |
||
20 | { |
||
21 | /** |
||
22 | * Closure to use |
||
23 | * |
||
24 | * @var \Closure |
||
25 | */ |
||
26 | protected $closureToCall; |
||
27 | |||
28 | /** |
||
29 | * Previous instance of invocation |
||
30 | * |
||
31 | * @var null|object |
||
32 | */ |
||
33 | protected $previousInstance; |
||
34 | |||
35 | /** |
||
36 | * Invokes original method and return result from it |
||
37 | * |
||
38 | 7 | * @return mixed |
|
39 | */ |
||
40 | 7 | public function proceed() |
|
62 | |||
63 | /** |
||
64 | * Returns the object for which current joinpoint is invoked |
||
65 | * |
||
66 | * @return object Instance of object or null for static call/unavailable context |
||
67 | */ |
||
68 | final public function getThis(): ?object |
||
72 | |||
73 | /** |
||
74 | * Checks if the current joinpoint is dynamic or static |
||
75 | * |
||
76 | * Dynamic joinpoint contains a reference to an object that can be received via getThis() method call |
||
77 | * @see ClassJoinpoint::getThis() |
||
78 | */ |
||
79 | final public function isDynamic(): bool |
||
83 | |||
84 | /** |
||
85 | * Returns the static scope name (class name) of this joinpoint. |
||
86 | */ |
||
87 | final public function getScope(): string |
||
93 | } |
||
94 |