1 | <?php |
||
14 | class CompositeCollection implements CollectionReadInterface |
||
15 | { |
||
16 | use CollectionReadTrait; |
||
17 | |||
18 | /** @var CollectionReadInterface[] */ |
||
19 | private $collections = []; |
||
20 | private $data; |
||
21 | |||
22 | /** |
||
23 | * @return CollectionReadInterface[] |
||
24 | */ |
||
25 | public function getCollections() |
||
29 | |||
30 | /** |
||
31 | * @param CollectionReadInterface[] $collections |
||
32 | * |
||
33 | * @return $this |
||
34 | */ |
||
35 | 9 | public function setCollections(array $collections) |
|
41 | |||
42 | /** |
||
43 | * Returns composed collection by index |
||
44 | * |
||
45 | * @param $index |
||
46 | * |
||
47 | * @return CollectionReadInterface |
||
48 | */ |
||
49 | public function getCollection($index) |
||
55 | |||
56 | 1 | protected function createCollection(array $items) |
|
63 | |||
64 | /** |
||
65 | * Returns reference to array storing collection items. |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | 9 | protected function &items() |
|
75 | |||
76 | 9 | private function updateData() |
|
84 | } |
||
85 |