You are here

protected function PriorityList::compare in Zircon Profile 8

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

Compare the priority of two items.

Parameters

array $item1,:

array $item2:

Return value

int

File

vendor/zendframework/zend-stdlib/src/PriorityList.php, line 161

Class

PriorityList

Namespace

Zend\Stdlib

Code

protected function compare(array $item1, array $item2) {
  return $item1['priority'] === $item2['priority'] ? ($item1['serial'] > $item2['serial'] ? -1 : 1) * $this->isLIFO : ($item1['priority'] > $item2['priority'] ? -1 : 1);
}