1 | <?php |
||
10 | abstract class Collection implements Iterator, Countable, ArrayAccess, JsonSerializable |
||
11 | { |
||
12 | protected $items; |
||
13 | protected $key; |
||
14 | |||
15 | 12 | public function __construct(array $items = []) |
|
19 | |||
20 | 1 | public function __clone() |
|
26 | |||
27 | 4 | public function reset(): void |
|
31 | |||
32 | public function replace(array $items = []): void |
||
36 | |||
37 | 12 | public function add($item): void |
|
41 | |||
42 | 11 | public function first() |
|
46 | |||
47 | public function toArray(): array |
||
51 | |||
52 | public function jsonSerialize(): array |
||
58 | |||
59 | 7 | public function count(): int |
|
63 | |||
64 | 2 | public function current() |
|
68 | |||
69 | 2 | public function next() |
|
73 | |||
74 | 2 | public function key(): int |
|
78 | |||
79 | 11 | public function valid(): bool |
|
84 | |||
85 | 11 | public function rewind(): void |
|
89 | |||
90 | public function offsetExists($offset): bool |
||
94 | |||
95 | public function offsetGet($offset) |
||
99 | |||
100 | 1 | public function offsetSet($offset, $value): void |
|
101 | { |
||
102 | 1 | $this->items[$offset] = $value; |
|
103 | 1 | } |
|
104 | |||
105 | 1 | public function offsetUnset($offset): void |
|
109 | } |
||
110 |