| 1 | <?php  | 
            ||
| 4 | class Collection implements \ArrayAccess, \Iterator  | 
            ||
| 5 | { | 
            ||
| 6 | /** @var \Ackintosh\Snidel\Result\Result[] */  | 
            ||
| 7 | private $results = array();  | 
            ||
| 8 | |||
| 9 | /** @var int */  | 
            ||
| 10 | private $position;  | 
            ||
| 11 | |||
| 12 | /**  | 
            ||
| 13 | * @param \Ackintosh\Snidel\Result\Result[]  | 
            ||
| 14 | */  | 
            ||
| 15 | public function __construct($results)  | 
            ||
| 22 | |||
| 23 | /**  | 
            ||
| 24 | * @return array  | 
            ||
| 25 | */  | 
            ||
| 26 | public function toArray()  | 
            ||
| 35 | |||
| 36 | /**  | 
            ||
| 37 | * ArrayAccess interface  | 
            ||
| 38 | *  | 
            ||
| 39 | * @param mixed $offset  | 
            ||
| 40 | * @return bool  | 
            ||
| 41 | */  | 
            ||
| 42 | public function offsetExists($offset)  | 
            ||
| 50 | |||
| 51 | /**  | 
            ||
| 52 | * ArrayAccess interface  | 
            ||
| 53 | *  | 
            ||
| 54 | * @param mixed $offset  | 
            ||
| 55 | * @return mixed  | 
            ||
| 56 | */  | 
            ||
| 57 | public function offsetGet($offset)  | 
            ||
| 65 | |||
| 66 | /**  | 
            ||
| 67 | * ArrayAccess interface  | 
            ||
| 68 | *  | 
            ||
| 69 | * @param mixed $offset  | 
            ||
| 70 | * @return void  | 
            ||
| 71 | */  | 
            ||
| 72 | public function offsetSet($offset, $value)  | 
            ||
| 76 | |||
| 77 | /**  | 
            ||
| 78 | * ArrayAccess interface  | 
            ||
| 79 | *  | 
            ||
| 80 | * @param mixed $offset  | 
            ||
| 81 | * @return void  | 
            ||
| 82 | */  | 
            ||
| 83 | public function offsetUnset($offset)  | 
            ||
| 87 | |||
| 88 | /**  | 
            ||
| 89 | * Iterator interface  | 
            ||
| 90 | *  | 
            ||
| 91 | * @return \Ackintosh\Snidel\Fork  | 
            ||
| 92 | */  | 
            ||
| 93 | public function current()  | 
            ||
| 97 | |||
| 98 | /**  | 
            ||
| 99 | * Iterator interface  | 
            ||
| 100 | *  | 
            ||
| 101 | * @return int  | 
            ||
| 102 | */  | 
            ||
| 103 | public function key()  | 
            ||
| 107 | |||
| 108 | /**  | 
            ||
| 109 | * Iterator interface  | 
            ||
| 110 | *  | 
            ||
| 111 | * @return void  | 
            ||
| 112 | */  | 
            ||
| 113 | public function next()  | 
            ||
| 117 | |||
| 118 | /**  | 
            ||
| 119 | * Iterator interface  | 
            ||
| 120 | *  | 
            ||
| 121 | * @return void  | 
            ||
| 122 | */  | 
            ||
| 123 | public function rewind()  | 
            ||
| 127 | |||
| 128 | /**  | 
            ||
| 129 | * Iterator interface  | 
            ||
| 130 | *  | 
            ||
| 131 | * @return bool  | 
            ||
| 132 | */  | 
            ||
| 133 | public function valid()  | 
            ||
| 137 | }  | 
            ||
| 138 |