| 1 | <?php  | 
            ||
| 17 | class Collection implements \Countable, \Iterator, \ArrayAccess  | 
            ||
| 18 | { | 
            ||
| 19 | /**  | 
            ||
| 20 | * @var array  | 
            ||
| 21 | */  | 
            ||
| 22 | private $elements = [];  | 
            ||
| 23 | |||
| 24 | /**  | 
            ||
| 25 | * Constructor.  | 
            ||
| 26 | *  | 
            ||
| 27 | * @param array $elements  | 
            ||
| 28 | */  | 
            ||
| 29 | public function __construct(array $elements = [])  | 
            ||
| 33 | |||
| 34 | /**  | 
            ||
| 35 |      * {@inheritdoc} | 
            ||
| 36 | */  | 
            ||
| 37 | public function current()  | 
            ||
| 41 | |||
| 42 | /**  | 
            ||
| 43 |      * {@inheritdoc} | 
            ||
| 44 | */  | 
            ||
| 45 | public function next()  | 
            ||
| 49 | |||
| 50 | /**  | 
            ||
| 51 |      * {@inheritdoc} | 
            ||
| 52 | */  | 
            ||
| 53 | public function key()  | 
            ||
| 57 | |||
| 58 | /**  | 
            ||
| 59 |      * {@inheritdoc} | 
            ||
| 60 | */  | 
            ||
| 61 | public function valid()  | 
            ||
| 65 | |||
| 66 | /**  | 
            ||
| 67 |      * {@inheritdoc} | 
            ||
| 68 | */  | 
            ||
| 69 | public function rewind()  | 
            ||
| 73 | |||
| 74 | /**  | 
            ||
| 75 |      * {@inheritdoc} | 
            ||
| 76 | */  | 
            ||
| 77 | public function offsetExists($offset)  | 
            ||
| 81 | |||
| 82 | /**  | 
            ||
| 83 |      * {@inheritdoc} | 
            ||
| 84 | */  | 
            ||
| 85 | public function offsetGet($offset)  | 
            ||
| 89 | |||
| 90 | /**  | 
            ||
| 91 |      * {@inheritdoc} | 
            ||
| 92 | */  | 
            ||
| 93 | public function offsetSet($offset, $value)  | 
            ||
| 101 | |||
| 102 | /**  | 
            ||
| 103 |      * {@inheritdoc} | 
            ||
| 104 | */  | 
            ||
| 105 | public function offsetUnset($offset)  | 
            ||
| 109 | |||
| 110 | /**  | 
            ||
| 111 |      * {@inheritdoc} | 
            ||
| 112 | */  | 
            ||
| 113 | public function count()  | 
            ||
| 117 | }  | 
            ||
| 118 |