You are here

protected function PriorityQueue::getQueue in Zircon Profile 8

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

Get the inner priority queue instance

Return value

SplPriorityQueue

Throws

Exception\DomainException

2 calls to PriorityQueue::getQueue()
PriorityQueue::getIterator in vendor/zendframework/zend-stdlib/src/PriorityQueue.php
Retrieve the inner iterator
PriorityQueue::remove in vendor/zendframework/zend-stdlib/src/PriorityQueue.php
Remove an item from the queue

File

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

Class

PriorityQueue
Re-usable, serializable priority queue implementation

Namespace

Zend\Stdlib

Code

protected function getQueue() {
  if (null === $this->queue) {
    $this->queue = new $this->queueClass();
    if (!$this->queue instanceof \SplPriorityQueue) {
      throw new Exception\DomainException(sprintf('PriorityQueue expects an internal queue of type SplPriorityQueue; received "%s"', get_class($this->queue)));
    }
  }
  return $this->queue;
}