| 1 | <?php |
||
| 33 | class Queue implements IteratorAggregate, QueueInterface |
||
| 34 | { |
||
| 35 | /** |
||
| 36 | * Queue |
||
| 37 | * |
||
| 38 | * @var SplPriorityQueue |
||
| 39 | * |
||
| 40 | * @access protected |
||
| 41 | */ |
||
| 42 | protected $queue; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * __construct |
||
| 46 | * |
||
| 47 | * @access public |
||
| 48 | */ |
||
| 49 | 4 | public function __construct() |
|
| 53 | |||
| 54 | /** |
||
| 55 | * Count |
||
| 56 | * |
||
| 57 | * @return int |
||
| 58 | * |
||
| 59 | * @access public |
||
| 60 | */ |
||
| 61 | 3 | public function count() |
|
| 65 | |||
| 66 | /** |
||
| 67 | * Insert |
||
| 68 | * |
||
| 69 | * @param mixed $value value |
||
| 70 | * @param mixed $priority order priority |
||
| 71 | * |
||
| 72 | * @return void |
||
| 73 | * |
||
| 74 | * @access public |
||
| 75 | */ |
||
| 76 | 4 | public function insert($value, $priority) |
|
| 80 | |||
| 81 | /** |
||
| 82 | * Get Iterator |
||
| 83 | * |
||
| 84 | * @return SplPriorityQueue |
||
| 85 | * |
||
| 86 | * @access public |
||
| 87 | */ |
||
| 88 | 2 | public function getIterator() |
|
| 92 | |||
| 93 | /** |
||
| 94 | * Clear |
||
| 95 | * |
||
| 96 | * @return void |
||
| 97 | * |
||
| 98 | * @access public |
||
| 99 | */ |
||
| 100 | 2 | public function clear() |
|
| 106 | } |
||
| 107 |