| 1 | <?php |
||
| 21 | trait IteratorTrait |
||
| 22 | { |
||
| 23 | /** @var array<FormElementInterface> */ |
||
| 24 | protected $nodes = []; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Return the current element. |
||
| 28 | * |
||
| 29 | * @return FormElementInterface |
||
| 30 | */ |
||
| 31 | public function current() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Moves the pointer forward to next element. |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | public function next() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Returns the key of the current element. |
||
| 48 | * |
||
| 49 | * @return mixed |
||
| 50 | */ |
||
| 51 | public function key() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Checks if current position is valid. |
||
| 58 | * |
||
| 59 | * @return boolean |
||
| 60 | */ |
||
| 61 | public function valid() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Rewinds the Iterator to the first element. |
||
| 70 | * |
||
| 71 | * @return void |
||
| 72 | */ |
||
| 73 | public function rewind() |
||
| 77 | } |
||
| 78 |