1 | <?php |
||
25 | class DynamicInvocationMatcherInterceptor implements Interceptor, Serializable |
||
26 | { |
||
27 | /** |
||
28 | * Instance of pointcut to dynamically match joinpoints with args |
||
29 | * |
||
30 | * @var PointFilter |
||
31 | */ |
||
32 | protected $pointFilter; |
||
33 | |||
34 | /** |
||
35 | * Overloaded property for storing instance of Interceptor |
||
36 | * |
||
37 | * @var Interceptor |
||
38 | */ |
||
39 | protected $interceptor; |
||
40 | |||
41 | /** |
||
42 | * Dynamic matcher constructor |
||
43 | * |
||
44 | * @param PointFilter $pointFilter Instance of dynamic matcher |
||
45 | * @param Interceptor $interceptor Instance of interceptor to invoke |
||
46 | */ |
||
47 | public function __construct(PointFilter $pointFilter, Interceptor $interceptor) |
||
52 | |||
53 | /** |
||
54 | * Serializes an interceptor into string representation |
||
55 | * |
||
56 | * @return string the string representation of the object or null |
||
57 | */ |
||
58 | public function serialize() |
||
62 | |||
63 | /** |
||
64 | * Unserialize an interceptor from the string |
||
65 | * |
||
66 | * @param string $serialized The string representation of the object. |
||
67 | * @return void |
||
68 | */ |
||
69 | public function unserialize($serialized) |
||
73 | |||
74 | /** |
||
75 | * Method invoker |
||
76 | * |
||
77 | * @param Joinpoint $joinpoint the method invocation joinpoint |
||
78 | * |
||
79 | * @return mixed the result of the call to {@see Joinpoint->proceed()} |
||
80 | */ |
||
81 | final public function invoke(Joinpoint $joinpoint) |
||
94 | } |
||
95 |