1 | <?php |
||
20 | abstract class BaseInterceptor extends BaseAdvice implements Interceptor, Serializable |
||
21 | { |
||
22 | /** |
||
23 | * Pointcut expression |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $pointcutExpression = ''; |
||
28 | |||
29 | /** |
||
30 | * Advice to call |
||
31 | * |
||
32 | * @var Closure |
||
33 | */ |
||
34 | protected $adviceMethod; |
||
35 | |||
36 | /** |
||
37 | * Default constructor for interceptor |
||
38 | * |
||
39 | * @param Closure $adviceMethod Interceptor advice to call |
||
40 | * @param integer $order Order of interceptor |
||
41 | * @param string $pointcutExpression Pointcut expression or advice name |
||
42 | */ |
||
43 | public function __construct(Closure $adviceMethod, $order = 0, $pointcutExpression = '') |
||
49 | |||
50 | /** |
||
51 | * Getter for extracting the advice closure from Interceptor |
||
52 | * |
||
53 | * @return callable|null |
||
54 | */ |
||
55 | public function getRawAdvice() |
||
59 | |||
60 | /** |
||
61 | * Serializes an interceptor into string representation |
||
62 | * |
||
63 | * @return string the string representation of the object or null |
||
64 | */ |
||
65 | public function serialize() |
||
72 | |||
73 | /** |
||
74 | * Unserialize an interceptor from the string |
||
75 | * |
||
76 | * @param string $serialized The string representation of the object. |
||
77 | * @return void |
||
78 | */ |
||
79 | public function unserialize($serialized) |
||
87 | } |
||
88 |