You are here

public function PriorityQueue::hasPriority in Zircon Profile 8

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

Does the queue have an item with the given priority?

Parameters

int $priority:

Return value

bool

File

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

Class

PriorityQueue
Re-usable, serializable priority queue implementation

Namespace

Zend\Stdlib

Code

public function hasPriority($priority) {
  foreach ($this->items as $item) {
    if ($item['priority'] === $priority) {
      return true;
    }
  }
  return false;
}