1 | <?php |
||
19 | class AndPointcut implements Pointcut |
||
20 | { |
||
21 | |||
22 | use PointcutClassFilterTrait; |
||
23 | |||
24 | /** |
||
25 | * @var Pointcut |
||
26 | */ |
||
27 | protected $first; |
||
28 | |||
29 | /** |
||
30 | * @var Pointcut |
||
31 | */ |
||
32 | protected $second; |
||
33 | |||
34 | /** |
||
35 | * Returns pointcut kind |
||
36 | * |
||
37 | * @var int |
||
38 | */ |
||
39 | protected $kind = 0; |
||
40 | |||
41 | /** |
||
42 | * Signature method matcher constructor |
||
43 | * |
||
44 | * @param Pointcut $first First filter |
||
45 | * @param Pointcut $second Second filter |
||
46 | */ |
||
47 | 3 | public function __construct(Pointcut $first, Pointcut $second) |
|
55 | |||
56 | /** |
||
57 | * Performs matching of point of code |
||
58 | * |
||
59 | * @param mixed $point Specific part of code, can be any Reflection class |
||
60 | * @param null|mixed $context Related context, can be class or namespace |
||
61 | * @param null|string|object $instance Invocation instance or string for static calls |
||
62 | * @param null|array $arguments Dynamic arguments for method |
||
63 | * |
||
64 | * @return bool |
||
65 | */ |
||
66 | public function matches($point, $context = null, $instance = null, array $arguments = null) |
||
71 | |||
72 | /** |
||
73 | * Returns the kind of point filter |
||
74 | * |
||
75 | * @return integer |
||
76 | */ |
||
77 | 1 | public function getKind() |
|
81 | |||
82 | /** |
||
83 | * Checks if point filter matches the point |
||
84 | * |
||
85 | * @param Pointcut $pointcut Pointcut part |
||
86 | * @param \ReflectionMethod|\ReflectionProperty $point |
||
87 | * @param mixed $context Related context, can be class or namespace |
||
88 | * @param object|string|null $instance [Optional] Instance for dynamic matching |
||
89 | * @param array $arguments [Optional] Extra arguments for dynamic matching |
||
90 | * |
||
91 | * @return bool |
||
92 | */ |
||
93 | protected function matchPart(Pointcut $pointcut, $point, $context = null, $instance = null, array $arguments = null) |
||
98 | } |
||
99 |