| 1 | <?php |
||
| 19 | trait IteratorTrait |
||
| 20 | { |
||
| 21 | /** @var array<FormElementInterface> */ |
||
| 22 | protected $nodes = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Return the current element. |
||
| 26 | * |
||
| 27 | * @return FormElementInterface |
||
| 28 | */ |
||
| 29 | public function current() |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Moves the pointer forward to next element. |
||
| 36 | * |
||
| 37 | * @return void |
||
| 38 | */ |
||
| 39 | public function next() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Returns the key of the current element. |
||
| 46 | * |
||
| 47 | * @return mixed |
||
| 48 | */ |
||
| 49 | public function key() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Checks if current position is valid. |
||
| 56 | * |
||
| 57 | * @return boolean |
||
| 58 | */ |
||
| 59 | public function valid() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Rewinds the Iterator to the first element. |
||
| 68 | * |
||
| 69 | * @return void |
||
| 70 | */ |
||
| 71 | public function rewind() |
||
| 75 | } |
||
| 76 |