# The ParentIterator class

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

## Einführung

This extended FilterIterator allows a recursive iteration using RecursiveIteratorIterator that only shows those elements which have children.

## Klassenbeschreibung

class ParentIterator extends RecursiveFilterIterator {
/* Methoden */
public function __construct(RecursiveIterator `$iterator`)
public function accept(): bool
public function getChildren(): ParentIterator
public function hasChildren(): bool
public function next(): void
public function rewind(): void
/* Geerbte Methoden */
public function RecursiveFilterIterator::getChildren(): ?RecursiveFilterIterator
public function RecursiveFilterIterator::hasChildren(): bool
public function FilterIterator::accept(): bool
public function FilterIterator::current(): mixed
public function FilterIterator::key(): mixed
public function FilterIterator::next(): void
public function FilterIterator::rewind(): void
public function FilterIterator::valid(): bool
public function IteratorIterator::current(): mixed
public function IteratorIterator::getInnerIterator(): ?Iterator
public function IteratorIterator::key(): mixed
public function IteratorIterator::next(): void
public function IteratorIterator::rewind(): void
public function IteratorIterator::valid(): bool
}

## Inhaltsverzeichnis

- ParentIterator::accept — Determines acceptability
- ParentIterator::__construct — Constructs a ParentIterator
- ParentIterator::getChildren — Return the inner iterator's children contained in a ParentIterator
- ParentIterator::hasChildren — Check whether the inner iterator's current element has children
- ParentIterator::next — Move the iterator forward
- ParentIterator::rewind — Rewind the iterator

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open