You are here

public function SplQueue::toArray in Zircon Profile 8

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

Return an array representing the queue

Return value

array

Overrides SplQueue::toArray

1 call to SplQueue::toArray()
SplQueue::serialize in vendor/zendframework/zend-stdlib/src/SplQueue.php
Serialize
1 method overrides SplQueue::toArray()
SplQueue::toArray in vendor/zendframework/zend-stdlib/src/SplQueue.php
Return an array representing the queue

File

vendor/zendframework/zend-stdlib/src/SplQueue.php, line 24

Class

SplQueue
Serializable version of SplQueue

Namespace

Zend\Stdlib

Code

public function toArray() {
  $array = [];
  foreach ($this as $item) {
    $array[] = $item;
  }
  return $array;
}