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) |
||
52 | 25 | ||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function has($name) |
||
65 | |||
66 | 40 | /** |
|
67 | * {@inheritdoc} |
||
68 | 40 | */ |
|
69 | public function set($name, $object) |
||
73 | |||
74 | 41 | /** |
|
75 | * {@inheritdoc} |
||
76 | 41 | */ |
|
77 | 41 | public function getIterator() |
|
81 | |||
82 | 1 | /** |
|
83 | * {@inheritdoc} |
||
84 | 1 | */ |
|
85 | 1 | public function offsetExists($offset) |
|
89 | |||
90 | 2 | /** |
|
91 | * {@inheritdoc} |
||
92 | 2 | */ |
|
93 | public function offsetGet($offset) |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function offsetSet($offset, $value) |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function offsetUnset($offset) |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public function count() |
||
121 | |||
122 | /** |
||
123 | * @return array |
||
124 | */ |
||
125 | public function toArray() |
||
129 | } |
||
130 |