| 1 | <?php |
||
| 21 | class ErrorCollection extends ErrorResource implements \IteratorAggregate, \Countable |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var array|ErrorResourceInterface[] |
||
| 25 | */ |
||
| 26 | private $errors = []; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Add errors to collection |
||
| 30 | * |
||
| 31 | * @param ErrorResourceInterface ...$errors |
||
| 32 | */ |
||
| 33 | 4 | public function addErrors(ErrorResourceInterface ...$errors): void |
|
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | * |
||
| 41 | * @return \ArrayIterator|ErrorResourceInterface[] |
||
| 42 | */ |
||
| 43 | 4 | public function getIterator(): \ArrayIterator |
|
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | 1 | public function count(): int |
|
| 55 | } |
||
| 56 |