1 | <?php |
||
19 | class CircularArray extends SplFixedArray |
||
20 | { |
||
21 | /** |
||
22 | * Rewind if goes to last items |
||
23 | */ |
||
24 | 1 | public function next() |
|
34 | |||
35 | /** |
||
36 | * Convert a simple array to fixed circular array |
||
37 | * |
||
38 | * @param array $array |
||
39 | * @param boolean $save_indexes |
||
40 | * @return FixedCircularArray |
||
41 | */ |
||
42 | 2 | public static function fromArray($array, $save_indexes = true) |
|
52 | |||
53 | /** |
||
54 | * Convert to simple array |
||
55 | * |
||
56 | * @return array |
||
57 | */ |
||
58 | 1 | public function toArray() |
|
62 | } |
||
63 |