1 | <?php |
||
10 | abstract class CollectionDto implements IteratorAggregate, Countable, ArrayAccess |
||
11 | { |
||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | public $items; |
||
16 | |||
17 | 22 | protected function __construct(string $class, array $items) |
|
23 | |||
24 | 6 | public function count(): int |
|
28 | |||
29 | 1 | public function offsetExists($offset) |
|
30 | { |
||
31 | 1 | return array_key_exists($offset, $this->items); |
|
32 | } |
||
33 | |||
34 | 3 | public function offsetGet($offset) |
|
38 | |||
39 | 1 | public function offsetSet($offset, $value) |
|
43 | |||
44 | 1 | public function offsetUnset($offset) |
|
48 | } |
||
49 |