# A classe ParentIterator

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

## Introdução

Este FilterIterator estendido permite uma iteração recursiva usando RecursiveIteratorIterator que mostra apenas os elementos que têm filhos.

## Resumo da classe

class ParentIterator extends RecursiveFilterIterator {
/* Métodos */
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
/* Métodos herdados */
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
}

## Índice

- ParentIterator::accept — Determina a aceitabilidade
- ParentIterator::__construct — Constrói um ParentIterator
- ParentIterator::getChildren — Retorna os filhos do iterador interno de um ParentIterator
- ParentIterator::hasChildren — Verifica se o elemento atual do iterador interno tem ou não filhos
- ParentIterator::next — Avança o iterador
- ParentIterator::rewind — Recomeça o iterador

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