public function FastPriorityQueue::current in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-stdlib/src/FastPriorityQueue.php \Zend\Stdlib\FastPriorityQueue::current()
Get the current element in the queue
Return value
mixed
1 call to FastPriorityQueue::current()
- FastPriorityQueue::extract in vendor/
zendframework/ zend-stdlib/ src/ FastPriorityQueue.php - Extract an element in the queue according to the priority and the order of insertion
File
- vendor/
zendframework/ zend-stdlib/ src/ FastPriorityQueue.php, line 163
Class
- FastPriorityQueue
- This is an efficient implementation of an integer priority queue in PHP
Namespace
Zend\StdlibCode
public function current() {
switch ($this->extractFlag) {
case self::EXTR_DATA:
return current($this->values[$this->maxPriority]);
case self::EXTR_PRIORITY:
return $this->maxPriority;
case self::EXTR_BOTH:
return [
'data' => current($this->values[$this->maxPriority]),
'priority' => $this->maxPriority,
];
}
}