Zend\Stdlib\SplPriorityQueue
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).
Synopsis
class SplPriorityQueue
extends SplPriorityQueue
implements
Serializable
{
- // members
- protected int $serial;
- // methods
- public void insert()
- public array toArray()
- public string serialize()
- public void unserialize()
- // Inherited methods from SplPriorityQueue
- public void __construct()
- public int compare()
- public int count()
- public mixed current()
- public mixed extract()
- public void insert()
- public bool isEmpty()
- public mixed key()
- public void next()
- public void recoverFromCorruption()
- public void rewind()
- public void setExtractFlags()
- public mixed top()
- public bool valid()
Hierarchy
Extends
Extended by
Implements
Members
protected
- $serial — int
Methods
public
- insert() — Insert a value with a given priority
- serialize() — Serialize
- toArray() — Serialize to an array
- unserialize() — Deserialize
Inherited from SplPriorityQueue
public
- compare() — Compare priorities in order to place elements correctly in the heap while sifting up.
- count() — Counts the number of elements in the queue.
- current() — Return current node pointed by the iterator
- extract() — Extracts a node from top of the heap and sift up.
- insert() — Inserts an element in the queue by sifting it up.
- isEmpty() — Checks whether the queue is empty.
- key() — Return current node index
- next() — Move to the next node
- recoverFromCorruption() — Recover from the corrupted state and allow further actions on the queue.
- rewind() — Rewind iterator back to the start (no-op)
- setExtractFlags() — Sets the mode of extraction
- top() — Peeks at the node from the top of the queue
- valid() — Check whether the queue contains more nodes