You are here

public function SplPriorityQueue::serialize in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-stdlib/src/SplPriorityQueue.php \Zend\Stdlib\SplPriorityQueue::serialize()

Serialize

Return value

string

Overrides SplPriorityQueue::serialize

1 method overrides SplPriorityQueue::serialize()
SplPriorityQueue::serialize in vendor/zendframework/zend-stdlib/src/SplPriorityQueue.php
Serialize

File

vendor/zendframework/zend-stdlib/src/SplPriorityQueue.php, line 66

Class

SplPriorityQueue
Serializable version of SplPriorityQueue

Namespace

Zend\Stdlib

Code

public function serialize() {
  $clone = clone $this;
  $clone
    ->setExtractFlags(self::EXTR_BOTH);
  $data = [];
  foreach ($clone as $item) {
    $data[] = $item;
  }
  return serialize($data);
}