Fully Qualified Name: | Zend\EventManager\Filter\FilterIterator |
Extends: | FastPriorityQueue |
Specialized priority queue implementation for use with an intercepting filter chain.
Allows removal
Name | Description | Defined By |
---|---|---|
contains() | Does the queue contain a given value? | FilterIterator |
count() | Get the total number of elements in the queue | FastPriorityQueue |
current() | Get the current element in the queue | FastPriorityQueue |
extract() | Extract an element in the queue according to the priority and the order of insertion | FastPriorityQueue |
hasPriority() | Does the queue have an item with the given priority? | FastPriorityQueue |
insert() | Insert a value into the queue. | FilterIterator |
isEmpty() | Check if the queue is empty | FastPriorityQueue |
key() | Get the index of the current element in the queue | FastPriorityQueue |
next() | Iterate the next filter in the chain | FilterIterator |
remove() | Remove a value from the queue | FilterIterator |
rewind() | Rewind the current iterator | FastPriorityQueue |
serialize() | Serialize | FastPriorityQueue |
setExtractFlags() | Set the extract flag | FastPriorityQueue |
toArray() | Serialize to an array | FastPriorityQueue |
unserialize() | Deserialize | FastPriorityQueue |
valid() | Check if the current iterator is valid | FastPriorityQueue |
Does the queue contain a given value?
Parameter Name | Type | Description |
---|---|---|
$datum | mixed |
Returns: bool
Get the total number of elements in the queue
Returns: int
Get the current element in the queue
Returns: mixed
Extract an element in the queue according to the priority and the order of insertion
Returns: mixed
Does the queue have an item with the given priority?
Parameter Name | Type | Description |
---|---|---|
$priority | int |
Returns: bool
Insert a value into the queue.
Requires a callable.
Parameter Name | Type | Description |
---|---|---|
$value | callable | |
$priority | mixed |
Returns: void
Check if the queue is empty
Returns: bool
Get the index of the current element in the queue
Returns: int
Iterate the next filter in the chain
Iterates and calls the next filter in the chain.
Parameter Name | Type | Description |
---|---|---|
$context | mixed | |
$params | array | |
$chain | \FilterIterator |
Returns: mixed
Remove a value from the queue
This is an expensive operation. It must first iterate through all values, and then re-populate itself. Use only if absolutely necessary.
Parameter Name | Type | Description |
---|---|---|
$datum | mixed |
Returns: bool
Rewind the current iterator
Returns:
Serialize
Returns: string
Set the extract flag
Parameter Name | Type | Description |
---|---|---|
$flag | int |
Returns:
Serialize to an array
Array will be priority => data pairs
Returns: array
Deserialize
Parameter Name | Type | Description |
---|---|---|
$data | string |
Returns: void
Check if the current iterator is valid
Returns: bool