Fully Qualified Name: | Laminas\Config\Processor\Queue |
Extends: | PriorityQueue |
Implements: | ProcessorInterface |
Name | Description | Defined By |
---|---|---|
__clone() | Add support for deep cloning | PriorityQueue |
contains() | Does the queue contain the given datum? | PriorityQueue |
count() | How many items are in the queue? | PriorityQueue |
extract() | Extract a node from the inner queue and sift up | PriorityQueue |
getIterator() | Retrieve the inner iterator | PriorityQueue |
hasPriority() | Does the queue have an item with the given priority? | PriorityQueue |
insert() | Insert an item into the queue | PriorityQueue |
isEmpty() | Is the queue empty? | PriorityQueue |
process() | Process the whole config structure with each parser in the queue. | Queue |
processValue() | Process a single value | Queue |
remove() | Remove an item from the queue | PriorityQueue |
serialize() | Serialize the data structure | PriorityQueue |
setInternalQueueClass() | Specify the internal queue class | PriorityQueue |
toArray() | Serialize to an array | PriorityQueue |
top() | Peek at the top node in the queue, based on priority. | PriorityQueue |
unserialize() | Unserialize a string into a PriorityQueue object | PriorityQueue |
Add support for deep cloning
Returns: void
Does the queue contain the given datum?
Parameter Name | Type | Description |
---|---|---|
$datum | mixed |
Returns: bool
How many items are in the queue?
Returns: int
Extract a node from the inner queue and sift up
Returns: mixed
Retrieve the inner iterator
SplPriorityQueue acts as a heap, which typically implies that as items are iterated, they are also removed. This does not work for situations where the queue may be iterated multiple times. As such, this class aggregates the values, and also injects an SplPriorityQueue. This method retrieves the inner queue object, and clones it for purposes of iteration.
Returns: \SplPriorityQueue
Does the queue have an item with the given priority?
Parameter Name | Type | Description |
---|---|---|
$priority | int |
Returns: bool
Insert an item into the queue
Priority defaults to 1 (low priority) if none provided.
Parameter Name | Type | Description |
---|---|---|
$data | mixed | |
$priority | int |
Returns: \PriorityQueue
Is the queue empty?
Returns: bool
Process the whole config structure with each parser in the queue.
Parameter Name | Type | Description |
---|---|---|
$config | \Config |
Returns: \Config
Process a single value
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: mixed
Remove an item from the queue
This is different than {@link extract()}; its purpose is to dequeue an item.
This operation is potentially expensive, as it requires re-initialization and re-population of the inner queue.
Note: this removes the first item matching the provided item found. If the same item has been added multiple times, it will not remove other instances.
Parameter Name | Type | Description |
---|---|---|
$datum | mixed |
Returns: bool False if the item was not found, true otherwise.
Serialize the data structure
Returns: string
Specify the internal queue class
Please see {@link getIterator()} for details on the necessity of an internal queue class. The class provided should extend SplPriorityQueue.
Parameter Name | Type | Description |
---|---|---|
$class | string |
Returns: \PriorityQueue
Serialize to an array
By default, returns only the item data, and in the order registered (not sorted). You may provide one of the EXTR_* flags as an argument, allowing the ability to return priorities or both data and priority.
Parameter Name | Type | Description |
---|---|---|
$flag | int |
Returns: array
Peek at the top node in the queue, based on priority.
Returns: mixed
Unserialize a string into a PriorityQueue object
Serialization format is compatible with {@link Laminas\Stdlib\SplPriorityQueue}
Parameter Name | Type | Description |
---|---|---|
$data | string |
Returns: void