1 | <?php |
||
14 | class ValidatorChain |
||
15 | { |
||
16 | |||
17 | /** @var AbstractValidator[] */ |
||
18 | protected $validators = []; |
||
19 | |||
20 | /** @var array */ |
||
21 | protected $messages = []; |
||
22 | |||
23 | /** @var AbstractType|null */ |
||
24 | protected $field = null; |
||
25 | |||
26 | /** |
||
27 | * ValidatorChain constructor. |
||
28 | * @param AbstractType $field |
||
29 | * @codeCoverageIgnore |
||
30 | */ |
||
31 | public function __construct(AbstractType $field) |
||
35 | |||
36 | /** |
||
37 | * @param AbstractValidator $validator |
||
38 | * @codeCoverageIgnore |
||
39 | */ |
||
40 | public function add(AbstractValidator $validator) |
||
44 | |||
45 | /** |
||
46 | * @return AbstractValidator[] |
||
47 | * @codeCoverageIgnore |
||
48 | */ |
||
49 | public function getValidators(): array |
||
53 | |||
54 | /** |
||
55 | * @return boolean |
||
56 | * @codeCoverageIgnore |
||
57 | */ |
||
58 | public function validate() :bool |
||
79 | |||
80 | } |