| 1 | <?php |
||
| 13 | class NextIteration implements Iterator |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var XMLReader |
||
| 17 | */ |
||
| 18 | private $reader; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | private $index; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var bool |
||
| 27 | */ |
||
| 28 | private $valid; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | private $localName; |
||
| 34 | |||
| 35 | 7 | public function __construct(XMLReader $reader, $localName = null) |
|
| 40 | |||
| 41 | 7 | public function rewind() |
|
| 46 | |||
| 47 | 7 | public function valid() |
|
| 51 | |||
| 52 | 7 | public function current() |
|
| 56 | |||
| 57 | 7 | public function key() |
|
| 61 | |||
| 62 | 7 | public function next() |
|
| 72 | |||
| 73 | /** |
||
| 74 | * move cursor to the next element but only if it's not yet there |
||
| 75 | */ |
||
| 76 | 7 | private function moveReaderToCurrent() |
|
| 85 | } |
||
| 86 |