class SplPriorityQueue extends 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).

Properties

protected int $serial

Seed used to ensure queue order for items of the same priority.

Methods

bool
insert(mixed $value, mixed $priority)

Insert a value with a given priority.

array
toArray()

Serialize to an array.

Details

at line 37
bool insert(mixed $value, mixed $priority)

Insert a value with a given priority.

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

Parameters

mixed $value
mixed $priority

Return Value

bool

at line 50
array toArray()

Serialize to an array.

Array will be priority => data pairs

Return Value

array