1 | <?php |
||
10 | class ArrayCollection implements Countable, IteratorAggregate, ArrayAccess |
||
11 | { |
||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $container = []; |
||
16 | |||
17 | /** |
||
18 | * @param array $elements |
||
19 | */ |
||
20 | public function __construct(array $elements = array()) |
||
24 | |||
25 | /** |
||
26 | * @return array |
||
27 | */ |
||
28 | public function toArray() |
||
32 | |||
33 | /** |
||
34 | * @return array |
||
35 | */ |
||
36 | public function jsonSerialize() |
||
40 | |||
41 | /** |
||
42 | * @param string $offset |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function offsetExists($offset) |
||
49 | |||
50 | /** |
||
51 | * @param string $offset |
||
52 | * @return mixed |
||
53 | */ |
||
54 | public function offsetGet($offset) |
||
58 | |||
59 | /** |
||
60 | * @param string $offset |
||
61 | * @param mixed $value |
||
62 | */ |
||
63 | public function offsetSet($offset, $value) |
||
67 | |||
68 | /** |
||
69 | * @param string $offset |
||
70 | * @return null |
||
71 | */ |
||
72 | public function offsetUnset($offset) |
||
76 | |||
77 | /** |
||
78 | * @return int |
||
79 | */ |
||
80 | public function count() |
||
84 | |||
85 | /** |
||
86 | * @return ArrayIterator |
||
87 | */ |
||
88 | public function getIterator() |
||
92 | |||
93 | /** |
||
94 | * @param string $key |
||
95 | * @return null|mixed |
||
96 | */ |
||
97 | public function get($key) |
||
104 | |||
105 | /** |
||
106 | * @param string $key |
||
107 | * @param mixed $value |
||
108 | */ |
||
109 | public function set($key, $value) |
||
113 | |||
114 | /** |
||
115 | * @param mixed $value |
||
116 | * @return bool |
||
117 | */ |
||
118 | public function add($value) |
||
123 | |||
124 | /** |
||
125 | * @param string $key |
||
126 | * @return null|mixed |
||
127 | */ |
||
128 | public function remove($key) |
||
138 | |||
139 | public function removeAll() |
||
143 | } |
||
144 |