You are here

public function FastPriorityQueue::next in Zircon Profile 8

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

Set the iterator pointer to the next element in the queue without removing the previous element

1 call to FastPriorityQueue::next()
FastPriorityQueue::remove in vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php
Remove an item from the queue

File

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

Class

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

Namespace

Zend\Stdlib

Code

public function next() {
  if (false === next($this->values[$this->maxPriority])) {
    unset($this->subPriorities[$this->maxPriority]);
    reset($this->values[$this->maxPriority]);
    $this->maxPriority = empty($this->subPriorities) ? 0 : max($this->subPriorities);
    $this->subIndex = -1;
  }
  ++$this->index;
  ++$this->subIndex;
}