1 | <?php namespace Limoncello\Validation\Validator; |
||
28 | abstract class BaseValidator implements ValidatorInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var bool |
||
32 | */ |
||
33 | private $areAggregatorsDirty = false; |
||
34 | |||
35 | /** |
||
36 | * @var CaptureAggregatorInterface |
||
37 | */ |
||
38 | private $captures; |
||
39 | |||
40 | /** |
||
41 | * @var ErrorAggregatorInterface |
||
42 | */ |
||
43 | private $errors; |
||
44 | |||
45 | /** |
||
46 | * Constructor. |
||
47 | */ |
||
48 | 5 | public function __construct() |
|
52 | |||
53 | /** |
||
54 | * @inheritdoc |
||
55 | */ |
||
56 | 2 | public function getCaptures(): array |
|
60 | |||
61 | /** |
||
62 | * @inheritdoc |
||
63 | */ |
||
64 | 2 | public function getErrors(): array |
|
68 | |||
69 | /** |
||
70 | * @return CaptureAggregatorInterface |
||
71 | */ |
||
72 | 5 | protected function getCaptureAggregator(): CaptureAggregatorInterface |
|
76 | |||
77 | /** |
||
78 | * @return ErrorAggregatorInterface |
||
79 | */ |
||
80 | 5 | protected function getErrorAggregator(): ErrorAggregatorInterface |
|
84 | |||
85 | /** |
||
86 | * @return CaptureAggregatorInterface |
||
87 | */ |
||
88 | 5 | protected function createCaptureAggregator(): CaptureAggregatorInterface |
|
92 | |||
93 | /** |
||
94 | * @return ErrorAggregatorInterface |
||
95 | */ |
||
96 | 5 | protected function createErrorAggregator(): ErrorAggregatorInterface |
|
100 | |||
101 | /** |
||
102 | * @return bool |
||
103 | */ |
||
104 | 5 | protected function areAggregatorsDirty(): bool |
|
108 | |||
109 | /** |
||
110 | * @return self |
||
111 | */ |
||
112 | 5 | protected function markAggregatorsAsDirty(): self |
|
118 | |||
119 | /** |
||
120 | * @return self |
||
121 | */ |
||
122 | 5 | protected function resetAggregators(): self |
|
131 | } |
||
132 |