class SplQueue in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-stdlib/src/SplQueue.php \Zend\Stdlib\SplQueue
Serializable version of SplQueue
Hierarchy
Expanded class hierarchy of SplQueue
File
- vendor/
zendframework/ zend-stdlib/ src/ SplQueue.php, line 17
Namespace
Zend\StdlibView source
class SplQueue extends \SplQueue implements Serializable {
/**
* Return an array representing the queue
*
* @return array
*/
public function toArray() {
$array = [];
foreach ($this as $item) {
$array[] = $item;
}
return $array;
}
/**
* Serialize
*
* @return string
*/
public function serialize() {
return serialize($this
->toArray());
}
/**
* Unserialize
*
* @param string $data
* @return void
*/
public function unserialize($data) {
foreach (unserialize($data) as $item) {
$this
->push($item);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SplQueue:: |
public | function |
Serialize Overrides SplQueue:: |
1 |
SplQueue:: |
public | function |
Return an array representing the queue Overrides SplQueue:: |
1 |
SplQueue:: |
public | function |
Unserialize Overrides SplQueue:: |
1 |