Serializable version of SplPriorityQueue
Also, provides predictable heap order for datums added with the same priority (i.e., they will be emitted in the same order they are enqueued).
category | Zend |
---|---|
package | Zend_Stdlib |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \SplPriorityQueue |
__construct() : void
Creates a new, empty queue
inherited_from | \SplPriorityQueue::__construct() |
---|
__construct() : void
Creates a new, empty queue
compare(mixed $priority1, mixed $priority2) : integer
Returns positive integer if $priority1 is greater than $priority2, 0 if equal, negative otherwise.
Unused internally, and only included in order to retain the same interface as PHP's SplPriorityQueue.
mixed
mixed
integer
count() : integer
integer
current() : mixed
mixed
extract() : \mixed;
Returns either the value, the priority, or both, depending on the extract flag.
\mixed;
insert(mixed $datum, mixed $priority) : void
Utilizes {@var $serial} to ensure that values of equal priority are emitted in the same order in which they are inserted.
inherited_from | \SplPriorityQueue::insert() |
---|
mixed
mixed
insert(mixed $value, mixed $priority) : void
mixed
mixed
isEmpty() : boolean
boolean
key() : mixed
mixed
Usually an int or stringnext() : void
recoverFromCorruption() : void
Unimplemented, and only included in order to retain the same interface as PHP's SplPriorityQueue.
rewind() : void
serialize() : string
string
setExtractFlags(integer $flags) : void
Defines what is extracted by SplPriorityQueue::current(), SplPriorityQueue::top() and SplPriorityQueue::extract().
The default mode is SplPriorityQueue::EXTR_DATA.
integer
toArray() : array
Array will be priority => data pairs
array
top() : mixed
mixed
unserialize(string $data) : void
string
valid() : boolean
boolean
prepareQueue() : void
sort() : void
$count : integer
0
$extractFlags : integer
self::EXTR_DATA
$isPhp53 : boolean
$preparedQueue : boolean | array
false
$queue : array
array()
$serial : integer
PHP_INT_MAX
EXTR_BOTH = 3
EXTR_DATA = 1
EXTR_PRIORITY = 2