1 | <?php |
||
5 | final 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 Person[] $people_array |
||
20 | * |
||
21 | * @return CoupleCollection |
||
22 | */ |
||
23 | 6 | public static function buildAllPossibleCouplesFromPeopleArray(array $people_array): CoupleCollection |
|
37 | |||
38 | public function allItems() |
||
42 | |||
43 | public function offsetExists($offset) |
||
47 | |||
48 | 4 | public function offsetGet($offset) |
|
52 | |||
53 | public function offsetSet($offset, $value) |
||
57 | |||
58 | public function offsetUnset($offset) |
||
62 | |||
63 | 6 | public function count() |
|
67 | |||
68 | |||
69 | 4 | public function current() |
|
73 | |||
74 | 4 | public function next() |
|
78 | |||
79 | public function key() |
||
83 | |||
84 | 4 | public function valid() |
|
88 | |||
89 | 4 | public function rewind() |
|
93 | } |
||
94 |