1 | <?php |
||
13 | class Collection implements ArrayAccess, Countable, IteratorAggregate, ICollection, Jsonable, Stringable, JsonSerializable |
||
14 | { |
||
15 | protected $items = []; |
||
16 | |||
17 | public function __construct(array $items = []) |
||
21 | |||
22 | public function put($key, $value) |
||
27 | |||
28 | public function get($key, $default = null) |
||
32 | |||
33 | public function has($key) |
||
37 | |||
38 | public function forget($key) |
||
43 | |||
44 | public function all(): array |
||
48 | |||
49 | public function isEmpty(): bool |
||
53 | |||
54 | public function isNotEmpty(): bool |
||
58 | |||
59 | public function first() |
||
63 | |||
64 | public function last() |
||
68 | |||
69 | public function jsonSerialize() |
||
73 | |||
74 | public function toJson(int $options = 0): string |
||
78 | |||
79 | public function getIterator(): ArrayIterator |
||
83 | |||
84 | public function count(): int |
||
88 | |||
89 | public function offsetExists($key) |
||
93 | |||
94 | public function offsetGet($key) |
||
98 | |||
99 | public function offsetSet($key, $value) |
||
107 | |||
108 | public function offsetUnset($key) |
||
112 | |||
113 | public function __toString(): string |
||
117 | |||
118 | public function each(callable $callback) |
||
127 | } |