| 1 | <?php |
||
| 5 | trait InternalIteratorTrait |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var \Iterator |
||
| 9 | */ |
||
| 10 | protected $iterator; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Return the current element. |
||
| 14 | * |
||
| 15 | * @link http://php.net/manual/en/iterator.current.php |
||
| 16 | * |
||
| 17 | * @return mixed Can return any type. |
||
| 18 | * |
||
| 19 | * @since 5.0.0 |
||
| 20 | */ |
||
| 21 | public function current() |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Move forward to next element. |
||
| 28 | * |
||
| 29 | * @link http://php.net/manual/en/iterator.next.php |
||
| 30 | * @since 5.0.0 |
||
| 31 | */ |
||
| 32 | public function next() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Return the key of the current element. |
||
| 39 | * |
||
| 40 | * @link http://php.net/manual/en/iterator.key.php |
||
| 41 | * |
||
| 42 | * @return mixed scalar on success, or null on failure. |
||
| 43 | * |
||
| 44 | * @since 5.0.0 |
||
| 45 | */ |
||
| 46 | public function key() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Checks if current position is valid. |
||
| 53 | * |
||
| 54 | * @link http://php.net/manual/en/iterator.valid.php |
||
| 55 | * |
||
| 56 | * @return bool The return value will be casted to boolean and then evaluated. |
||
| 57 | * Returns true on success or false on failure. |
||
| 58 | * |
||
| 59 | * @since 5.0.0 |
||
| 60 | */ |
||
| 61 | public function valid() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Rewind the Iterator to the first element. |
||
| 68 | * |
||
| 69 | * @link http://php.net/manual/en/iterator.rewind.php |
||
| 70 | * @since 5.0.0 |
||
| 71 | */ |
||
| 72 | public function rewind() |
||
| 79 | } |
||
| 80 |