FileAccess Orion

SplPriorityQueue extends SplPriorityQueue
in package
implements Serializable

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

Interfaces, Classes, Traits and Enums

Serializable

Table of Contents

$serial  : int
insert()  : void
Insert a value with a given priority
serialize()  : string
Serialize
toArray()  : array<string|int, mixed>
Serialize to an array
unserialize()  : void
Deserialize

Properties

$serial

protected int $serial = PHP_INT_MAX

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

Methods

insert()

Insert a value with a given priority

public insert(mixed $datum, mixed $priority) : void

Utilizes to ensure that values of equal priority are emitted in the same order in which they are inserted.

Parameters
$datum : mixed
$priority : mixed
Return values
void

serialize()

Serialize

public serialize() : string
Return values
string

toArray()

Serialize to an array

public toArray() : array<string|int, mixed>

Array will be priority => data pairs

Return values
array<string|int, mixed>

unserialize()

Deserialize

public unserialize(string $data) : void
Parameters
$data : string
Return values
void

Search results