You are here

public function FastPriorityQueue::toArray in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php \Zend\Stdlib\FastPriorityQueue::toArray()

Serialize to an array

Array will be priority => data pairs

Return value

array

File

vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php, line 249

Class

FastPriorityQueue
This is an efficient implementation of an integer priority queue in PHP

Namespace

Zend\Stdlib

Code

public function toArray() {
  $array = [];
  foreach (clone $this as $item) {
    $array[] = $item;
  }
  return $array;
}