Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<NoRewindIterator::validParentIterator::accept>
^IteratorsLast updated: Mon, 26 Oct 2026

The ParentIterator class

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

Introduction

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

Class synopsis

class ParentIterator extends RecursiveFilterIterator {
/* Methods */
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
/* Inherited methods */
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::key(): mixed
public function IteratorIterator::next(): void
public function IteratorIterator::rewind(): void
public function IteratorIterator::valid(): bool
}

Table of Contents


<NoRewindIterator::validParentIterator::accept>
^IteratorsLast updated: Mon, 26 Oct 2026