Zend Framework
3.0
|
Specialized priority queue implementation for use with an intercepting filter chain. More...
Public Member Functions | |
contains ($datum) | |
Does the queue contain a given value? | |
insert ($value, $priority) | |
Insert a value into the queue. | |
remove ($datum) | |
Remove a value from the queue. | |
next ($context=null, array $params=[], $chain=null) | |
Iterate the next filter in the chain. | |
Public Member Functions inherited from FastPriorityQueue | |
insert ($value, $priority) | |
Insert an element in the queue with a specified priority. | |
extract () | |
Extract an element in the queue according to the priority and the order of insertion. | |
remove ($datum) | |
Remove an item from the queue. | |
count () | |
Get the total number of elements in the queue. | |
current () | |
Get the current element in the queue. | |
key () | |
Get the index of the current element in the queue. | |
next () | |
Set the iterator pointer to the next element in the queue without removing the previous element. | |
valid () | |
Check if the current iterator is valid. | |
rewind () | |
Rewind the current iterator. | |
toArray () | |
Serialize to an array. | |
serialize () | |
Serialize. | |
unserialize ($data) | |
Deserialize. | |
setExtractFlags ($flag) | |
Set the extract flag. | |
isEmpty () | |
Check if the queue is empty. | |
contains ($datum) | |
Does the queue contain the given datum? | |
hasPriority ($priority) | |
Does the queue have an item with the given priority? | |
Additional Inherited Members | |
Public Attributes inherited from FastPriorityQueue | |
const | EXTR_DATA = PhpSplPriorityQueue::EXTR_DATA |
const | EXTR_PRIORITY = PhpSplPriorityQueue::EXTR_PRIORITY |
const | EXTR_BOTH = PhpSplPriorityQueue::EXTR_BOTH |
Protected Member Functions inherited from FastPriorityQueue | |
nextAndRemove () | |
Set the iterator pointer to the next element in the queue removing the previous element. | |
Protected Attributes inherited from FastPriorityQueue | |
$extractFlag = self::EXTR_DATA | |
$values = [] | |
$priorities = [] | |
$subPriorities = [] | |
$maxPriority = 0 | |
$count = 0 | |
$index = 0 | |
$subIndex = 0 | |
Specialized priority queue implementation for use with an intercepting filter chain.
Allows removal
contains | ( | $datum | ) |
Does the queue contain a given value?
mixed | $datum |
insert | ( | $value, | |
$priority | |||
) |
Insert a value into the queue.
Requires a callable.
callable | $value | |
mixed | $priority |
Exception\InvalidArgumentException | for non-callable $value. |
next | ( | $context = null , |
|
array | $params = [] , |
||
$chain = null |
|||
) |
Iterate the next filter in the chain.
Iterates and calls the next filter in the chain.
mixed | $context | |
array | $params | |
FilterIterator | $chain |
remove | ( | $datum | ) |
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.
mixed | $datum |