1 | <?php |
||
19 | */ |
||
20 | class TruePointcut implements Pointcut |
||
21 | { |
||
22 | use PointcutClassFilterTrait; |
||
23 | |||
24 | /** |
||
25 | * Filter kind |
||
26 | */ |
||
27 | protected int $filterKind; |
||
|
|||
28 | |||
29 | /** |
||
30 | * Default constructor can be used to specify concrete filter kind |
||
31 | 12 | */ |
|
32 | public function __construct(int $filterKind = self::KIND_ALL) |
||
33 | 12 | { |
|
34 | 12 | $this->filterKind = $filterKind; |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * Performs matching of point of code |
||
39 | * |
||
40 | * @param mixed $point Specific part of code, can be any Reflection class |
||
41 | * @param null|mixed $context Related context, can be class or namespace |
||
42 | * @param null|string|object $instance Invocation instance or string for static calls |
||
43 | * @param null|array $arguments Dynamic arguments for method |
||
44 | 1 | */ |
|
45 | public function matches($point, $context = null, $instance = null, array $arguments = null): bool |
||
46 | 1 | { |
|
47 | return true; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Returns the kind of point filter |
||
52 | 5 | */ |
|
53 | public function getKind(): int |
||
54 | 5 | { |
|
55 | return $this->filterKind; |
||
56 | } |
||
57 | } |
||
58 |