# FilterIterator 类

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

## 简介

这个抽象类的遍历并过滤出不想要的值。这个类应该被实现了迭代过滤器的类继承 FilterIterator::accept() 方法必须被子类实现。

## 类摘要

abstract class FilterIterator extends IteratorIterator {
/* 方法 */
public function __construct(Iterator `$iterator`)
public function accept(): bool
public function current(): mixed
public function key(): mixed
public function next(): void
public function rewind(): void
public function 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
}

## 目录

- FilterIterator::accept — Check whether the current element of the iterator is acceptable
- FilterIterator::__construct — Construct a filterIterator
- FilterIterator::current — Get the current element value
- FilterIterator::key — Get the current key
- FilterIterator::next — Move the iterator forward
- FilterIterator::rewind — Rewind the iterator
- FilterIterator::valid — Check whether the current element is valid

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