1 | <?php |
||
16 | class BoxList implements \Countable, \IteratorAggregate |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $list = []; |
||
22 | |||
23 | /** |
||
24 | * @return int |
||
25 | */ |
||
26 | public function count() |
||
30 | |||
31 | /** |
||
32 | * @return \ArrayIterator |
||
33 | */ |
||
34 | 21 | public function getIterator() |
|
39 | |||
40 | /** |
||
41 | * Insert a box choice into the list |
||
42 | * |
||
43 | * @param Box $box |
||
44 | */ |
||
45 | 20 | public function insert(Box $box) |
|
49 | |||
50 | /** |
||
51 | * Sort the boxes into order (smallest volume first) |
||
52 | */ |
||
53 | 21 | protected function sort() |
|
68 | |||
69 | |||
70 | } |
||
71 |