3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Stdlib
;
15 * Serializable version of SplStack
17 class SplStack
extends \SplStack
implements Serializable
20 * Serialize to an array representing the stack
24 public function toArray()
27 foreach ($this as $item) {
38 public function serialize()
40 return serialize($this->toArray());
49 public function unserialize($data)
51 foreach (unserialize($data) as $item) {
52 $this->unshift($item);