The FilterIterator class

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

Introduction

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 {
/* Methods */
public __construct(Iterator $iterator)
public accept(): bool
public current(): mixed
public key(): mixed
public next(): void
public rewind(): void
public valid(): bool
/* Inherited methods */
}

Table of Contents

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top