| 1 | <?php |
||
| 8 | class RecursiveDOMIterator implements RecursiveIterator |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Current Position in DOMNodeList |
||
| 12 | * @var Integer |
||
| 13 | */ |
||
| 14 | protected $_position; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The DOMNodeList with all children to iterate over |
||
| 18 | * @var DOMNodeList |
||
| 19 | */ |
||
| 20 | protected $_nodeList; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param DOMNode $domNode |
||
| 24 | * @return void |
||
|
|
|||
| 25 | */ |
||
| 26 | public function __construct(DOMNode $domNode) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Returns the current DOMNode |
||
| 34 | * @return DOMNode |
||
| 35 | */ |
||
| 36 | public function current() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Returns an iterator for the current iterator entry |
||
| 43 | * @return RecursiveDOMIterator |
||
| 44 | */ |
||
| 45 | public function getChildren() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Returns if an iterator can be created for the current entry. |
||
| 52 | * @return Boolean |
||
| 53 | */ |
||
| 54 | public function hasChildren() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Returns the current position |
||
| 61 | * @return Integer |
||
| 62 | */ |
||
| 63 | public function key() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Moves the current position to the next element. |
||
| 70 | * @return void |
||
| 71 | */ |
||
| 72 | public function next() |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Rewind the Iterator to the first element |
||
| 79 | * @return void |
||
| 80 | */ |
||
| 81 | public function rewind() |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Checks if current position is valid |
||
| 88 | * @return Boolean |
||
| 89 | */ |
||
| 90 | public function valid() |
||
| 94 | } |
||
| 95 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.