1 | <?php |
||
19 | final class StaticClosureMethodInvocation extends AbstractMethodInvocation |
||
20 | { |
||
21 | /** |
||
22 | * Closure to use |
||
23 | * |
||
24 | * @var Closure |
||
25 | */ |
||
26 | protected $closureToCall; |
||
27 | |||
28 | /** |
||
29 | * Previous scope of invocation |
||
30 | * |
||
31 | * @var null|string |
||
32 | */ |
||
33 | protected $previousScope; |
||
34 | |||
35 | /** |
||
36 | * Proceeds all registered advices for the static method and returns an invocation result |
||
37 | */ |
||
38 | 13 | public function proceed() |
|
58 | |||
59 | /** |
||
60 | * Returns static method invoker for the concrete method in the class |
||
61 | */ |
||
62 | 13 | protected static function getStaticInvoker(string $className, string $methodName): Closure |
|
68 | |||
69 | /** |
||
70 | * Checks if the current joinpoint is dynamic or static |
||
71 | * |
||
72 | * Dynamic joinpoint contains a reference to an object that can be received via getThis() method call |
||
73 | * |
||
74 | * @see ClassJoinpoint::getThis() |
||
75 | */ |
||
76 | final public function isDynamic(): bool |
||
80 | |||
81 | /** |
||
82 | * Returns the object for which current joinpoint is invoked |
||
83 | * |
||
84 | * @return object Instance of object or null for static call/unavailable context |
||
85 | */ |
||
86 | final public function getThis(): ?object |
||
90 | |||
91 | /** |
||
92 | * Returns the static scope name (class name) of this joinpoint. |
||
93 | */ |
||
94 | final public function getScope(): string |
||
99 | } |
||
100 |