TQueue implements a queue. The typical queue operations are implemented, which include {@link enqueue()}, {@link dequeue()} and {@link peek()}. In addition, {@link contains()} can be used to check if an item is contained in the queue. To obtain the number of the items in the queue, check the {@link getCount Count} property. Items in the queue may be traversed using foreach as follows, foreach($queue as $item) ...
Since: 3.1
Author: Qiang Xue (qiang.xue@gmail.com)
Author: Knut Urdalen (knut.urdalen@gmail.com)
Inheritance: extends Prado\TComponent, implements IteratorAggregate, implements Countable
Beispiel #1
0
 public function testGetCount()
 {
     $queue = new TQueue();
     self::assertEquals(0, $queue->getCount());
     $queue = new TQueue(array(1, 2, 3));
     self::assertEquals(3, $queue->getCount());
 }