Class SplPriorityQueue

Summary

Fully Qualified Name: Zend\Stdlib\SplPriorityQueue
Extends: SplPriorityQueue
Implements: Serializable

Description

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).

Methods

Name Description Defined By
insert() Insert a value with a given priority SplPriorityQueue
serialize() Serialize SplPriorityQueue
toArray() Serialize to an array SplPriorityQueue
unserialize() Deserialize SplPriorityQueue

Method Details

insert()

Insert a value with a given priority

Utilizes {@var $serial} to ensure that values of equal priority are emitted in the same order in which they are inserted.

Parameter Name Type Description
$datum mixed
$priority mixed

Returns: void

serialize()

Serialize

Returns: string

toArray()

Serialize to an array

Array will be priority => data pairs

Returns: array

unserialize()

Deserialize

Parameter Name Type Description
$data string

Returns: void

Top