fix calendar css, take 2. (#213)
[openemr.git] / interface / modules / zend_modules / library / Zend / Stdlib / SplStack.php
blobfac77a5d0475c38c0325121a7879b4fd954fc9f4
1 <?php
2 /**
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
8 */
10 namespace Zend\Stdlib;
12 use Serializable;
14 /**
15 * Serializable version of SplStack
17 class SplStack extends \SplStack implements Serializable
19 /**
20 * Serialize to an array representing the stack
22 * @return array
24 public function toArray()
26 $array = array();
27 foreach ($this as $item) {
28 $array[] = $item;
30 return $array;
33 /**
34 * Serialize
36 * @return string
38 public function serialize()
40 return serialize($this->toArray());
43 /**
44 * Unserialize
46 * @param string $data
47 * @return void
49 public function unserialize($data)
51 foreach (unserialize($data) as $item) {
52 $this->unshift($item);