| 1 | <?php |
||
| 19 | class RuleInterceptor implements InterceptorInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var \Closure |
||
| 23 | */ |
||
| 24 | private $reducer; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * RuleInterceptor constructor. |
||
| 28 | * @param \Closure $reduce |
||
| 29 | */ |
||
| 30 | public function __construct(\Closure $reduce) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param RuleInterface $value |
||
| 37 | * @return bool |
||
| 38 | */ |
||
| 39 | public function match($value): bool |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param ContextInterface $context |
||
| 46 | * @param mixed $value |
||
| 47 | * @return array |
||
| 48 | */ |
||
| 49 | public function resolve(ContextInterface $context, $value): array |
||
| 53 | } |
||
| 54 |