# The RecursiveFilterIterator class

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

## Introduction

This abstract iterator filters out unwanted values for a RecursiveIterator. This class should be extended to implement custom filters. The RecursiveFilterIterator::accept() must be implemented in the subclass.

## Class synopsis

abstract class RecursiveFilterIterator extends FilterIterator implements RecursiveIterator {
/* Methods */
public function __construct(RecursiveIterator `$iterator`)
public function getChildren(): ?RecursiveFilterIterator
public function hasChildren(): bool
/* 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::getInnerIterator(): ?Iterator
public function IteratorIterator::key(): mixed
public function IteratorIterator::next(): void
public function IteratorIterator::rewind(): void
public function IteratorIterator::valid(): bool
}

## Table of Contents

- RecursiveFilterIterator::__construct — Create a RecursiveFilterIterator from a RecursiveIterator
- RecursiveFilterIterator::getChildren — Return the inner iterator's children contained in a RecursiveFilterIterator
- RecursiveFilterIterator::hasChildren — Check whether the inner iterator's current element has children

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