1 | <?php |
||
10 | class Collection implements CollectionInterface, \Countable |
||
11 | { |
||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | private $collection = []; |
||
16 | |||
17 | /** |
||
18 | * Collection constructor. |
||
19 | * @param array $collection |
||
20 | 50 | */ |
|
21 | public function __construct(array $collection = []) |
||
25 | 5 | ||
26 | 5 | /** |
|
27 | 5 | * {@inheritdoc} |
|
28 | */ |
||
29 | public function get($name) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | 46 | */ |
|
43 | public function has($name) |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | 25 | */ |
|
51 | public function set($name, $object) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | 1 | */ |
|
59 | public function getIterator() |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | 40 | */ |
|
67 | public function offsetExists($offset) |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | 41 | */ |
|
75 | public function offsetGet($offset) |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | 1 | */ |
|
83 | public function offsetSet($offset, $value) |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | 2 | */ |
|
91 | public function offsetUnset($offset) |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | public function count() |
||
103 | |||
104 | /** |
||
105 | * @return array |
||
106 | */ |
||
107 | public function toArray() |
||
111 | } |
||
112 |