1 | <?php |
||
5 | class CoupleCollection implements \Iterator, \Countable, \ArrayAccess |
||
|
|||
6 | { |
||
7 | /** @var Couple[] */ |
||
8 | private $all_items; |
||
9 | |||
10 | /** |
||
11 | * @param Couple[] $couples_array |
||
12 | */ |
||
13 | 6 | private function __construct(array $couples_array) |
|
17 | |||
18 | /** |
||
19 | * @param array $people_array |
||
20 | * |
||
21 | * @return CoupleCollection |
||
22 | */ |
||
23 | 6 | public static function buildAllPossibleCouplesFromPeopleArray(array $people_array): CoupleCollection |
|
35 | |||
36 | public function allItems() |
||
40 | |||
41 | public function offsetExists($offset) |
||
45 | |||
46 | 4 | public function offsetGet($offset) |
|
50 | |||
51 | public function offsetSet($offset, $value) |
||
55 | |||
56 | public function offsetUnset($offset) |
||
60 | |||
61 | 6 | public function count() |
|
65 | |||
66 | |||
67 | 4 | public function current() |
|
71 | |||
72 | 4 | public function next() |
|
76 | |||
77 | public function key() |
||
81 | |||
82 | 4 | public function valid() |
|
86 | |||
87 | 4 | public function rewind() |
|
91 | } |
||
92 |