PHP Класс Prado\Collections\TQueue
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) ...
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Описание методов
__construct()
публичный Метод
Initializes the queue with an array or an iterable object.
Removes all items in the queue.
contains()
публичный Метод
copyFrom()
публичный Метод
Note, existing data in the list will be cleared first.
This method is required by \Countable interface.
dequeue()
публичный Метод
Removes and returns the object at the beginning of the queue.
enqueue()
публичный Метод
Adds an object to the end of the queue.
getCount()
публичный Метод
getIterator()
публичный Метод
This method is required by the interface \IteratorAggregate.
Unlike {@link dequeue()}, this method does not remove the item from the queue.
toArray()
публичный Метод