1 | <?php namespace Limoncello\Validation\Errors; |
||
25 | class ErrorAggregator implements ErrorAggregatorInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var ErrorInterface[] |
||
29 | */ |
||
30 | private $errors; |
||
31 | |||
32 | /** |
||
33 | * Constructor. |
||
34 | */ |
||
35 | 15 | public function __construct() |
|
39 | |||
40 | /** |
||
41 | * @inheritdoc |
||
42 | */ |
||
43 | 13 | public function add(ErrorInterface $error): ErrorAggregatorInterface |
|
49 | |||
50 | /** |
||
51 | * @inheritdoc |
||
52 | */ |
||
53 | 15 | public function get(): array |
|
57 | |||
58 | /** |
||
59 | * @inheritdoc |
||
60 | */ |
||
61 | 10 | public function count() |
|
65 | |||
66 | /** |
||
67 | * @inheritdoc |
||
68 | */ |
||
69 | 15 | public function clear(): ErrorAggregatorInterface |
|
75 | } |
||
76 |