1 | <?php |
||
14 | class PackedItemList extends \SplMaxHeap |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Compare elements in order to place them correctly in the heap while sifting up. |
||
19 | * |
||
20 | * @see \SplMaxHeap::compare() |
||
21 | * |
||
22 | * @param PackedItem $itemA |
||
23 | * @param PackedItem $itemB |
||
24 | * |
||
25 | * @return int |
||
26 | */ |
||
27 | 31 | public function compare($itemA, $itemB) |
|
37 | |||
38 | /** |
||
39 | * Get copy of this list as a standard PHP array |
||
40 | * @return PackedItem[] |
||
41 | */ |
||
42 | 1 | public function asArray() |
|
50 | |||
51 | /** |
||
52 | * Get copy of this list as a standard PHP array |
||
53 | * @return Item[] |
||
54 | */ |
||
55 | 3 | public function asItemArray() |
|
63 | } |
||
64 |