1 | <?php |
||
15 | class Interceptor implements InterceptorInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var callable |
||
19 | */ |
||
20 | private $matcher; |
||
21 | |||
22 | /** |
||
23 | * @var callable |
||
24 | */ |
||
25 | private $resolver; |
||
26 | |||
27 | /** |
||
28 | * Interceptor constructor. |
||
29 | * @param callable $matcher |
||
30 | * @param callable $resolver |
||
31 | */ |
||
32 | public function __construct(callable $matcher, callable $resolver) |
||
37 | |||
38 | /** |
||
39 | * @param mixed $value |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function match($value): bool |
||
46 | |||
47 | /** |
||
48 | * @param mixed $value |
||
49 | * @return mixed |
||
50 | */ |
||
51 | public function invoke($value) |
||
55 | |||
56 | /** |
||
57 | * @param $value |
||
58 | * @return mixed |
||
59 | */ |
||
60 | public function __invoke($value) |
||
64 | } |
||
65 |