insert() публичный Метод

Add an entry to the queue
public insert ( mixed $datum, integer $priority )
$datum mixed The entry to add
$priority integer The priority of the entry in the queue
Пример #1
0
 public function testUsesAPredictableOrder()
 {
     $queue = new PriorityQueue();
     for ($i = 0; $i < 10; $i++) {
         $queue->insert($i, 10);
     }
     $this->expectOutputString('0123456789');
     foreach ($queue as $value) {
         echo $value;
     }
 }