You are here

public function PriorityQueue::unserialize in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-stdlib/src/PriorityQueue.php \Zend\Stdlib\PriorityQueue::unserialize()

Unserialize a string into a PriorityQueue object

Serialization format is compatible with {@link Zend\Stdlib\SplPriorityQueue}

Parameters

string $data:

Return value

void

File

vendor/zendframework/zend-stdlib/src/PriorityQueue.php, line 189

Class

PriorityQueue
Re-usable, serializable priority queue implementation

Namespace

Zend\Stdlib

Code

public function unserialize($data) {
  foreach (unserialize($data) as $item) {
    $this
      ->insert($item['data'], $item['priority']);
  }
}