The FilterIterator class

From Get docs

The FilterIterator class


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

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

Class synopsis

abstract class FilterIterator extends IteratorIterator implements OuterIterator {

/* Methods */

public __construct(Iterator $iterator)

public accept(): bool
public current(): mixed
public getInnerIterator(): Iterator
public key(): mixed
public next(): void
public rewind(): void
public valid(): bool


Table of Contents

© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.