public function PriorityList::toArray in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-stdlib/src/PriorityList.php \Zend\Stdlib\PriorityList::toArray()
Return list as array
Parameters
int $flag:
Return value
array
File
- vendor/
zendframework/ zend-stdlib/ src/ PriorityList.php, line 259
Class
Namespace
Zend\StdlibCode
public function toArray($flag = self::EXTR_DATA) {
$this
->sort();
if ($flag == self::EXTR_BOTH) {
return $this->items;
}
return array_map(function ($item) use ($flag) {
return $flag == PriorityList::EXTR_PRIORITY ? $item['priority'] : $item['data'];
}, $this->items);
}