| 1 | <?php |
||
| 5 | abstract class StaticCollection implements CollectionInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var \SplFixedArray |
||
| 9 | */ |
||
| 10 | protected $set; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @return array |
||
| 14 | */ |
||
| 15 | 358 | public function all() |
|
| 19 | |||
| 20 | /** |
||
| 21 | * @return bool |
||
| 22 | */ |
||
| 23 | 272 | public function isNull() |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @return int |
||
| 30 | */ |
||
| 31 | 120 | public function count() |
|
| 32 | { |
||
| 33 | 120 | return $this->set->count(); |
|
| 34 | 120 | } |
|
| 35 | |||
| 36 | /** |
||
| 37 | * |
||
| 38 | */ |
||
| 39 | 6 | public function rewind() |
|
| 40 | { |
||
| 41 | 6 | $this->set->rewind(); |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return mixed |
||
| 46 | */ |
||
| 47 | 96 | public function current() |
|
| 51 | |||
| 52 | /** |
||
| 53 | * @return int |
||
| 54 | */ |
||
| 55 | 120 | public function key() |
|
| 56 | { |
||
| 57 | 120 | return $this->set->key(); |
|
| 58 | 120 | } |
|
| 59 | |||
| 60 | /** |
||
| 61 | * |
||
| 62 | */ |
||
| 63 | 120 | public function next() |
|
| 64 | { |
||
| 65 | 120 | $this->set->next(); |
|
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return bool |
||
| 70 | */ |
||
| 71 | public function valid() |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @param int $offset |
||
| 78 | * @return bool |
||
| 79 | */ |
||
| 80 | 6 | public function offsetExists($offset) |
|
| 84 | |||
| 85 | /** |
||
| 86 | * @param int $offset |
||
| 87 | */ |
||
| 88 | public function offsetUnset($offset) |
||
| 92 | 12 | ||
| 93 | /** |
||
| 94 | 12 | * @param int $offset |
|
| 95 | * @return mixed |
||
| 96 | */ |
||
| 97 | public function offsetGet($offset) |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @param int $offset |
||
| 107 | * @param mixed $value |
||
| 108 | */ |
||
| 109 | public function offsetSet($offset, $value) |
||
| 113 | } |
||
| 114 |