Documentation

CustomFilterIterator extends FilterIterator
in package

CustomFilterIterator filters files by applying anonymous functions.

The anonymous function receives a \SplFileInfo and must return false to remove files.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$filters  : mixed
__construct()  : mixed
accept()  : bool
Filters the iterator values.

Properties

Methods

__construct()

public __construct(Iterator $iterator, array<string|int, callable> $filters) : mixed
Parameters
$iterator : Iterator

The Iterator to filter

$filters : array<string|int, callable>

An array of PHP callbacks

Tags
throws
InvalidArgumentException
Return values
mixed

accept()

Filters the iterator values.

public accept() : bool
Return values
bool

true if the value should be kept, false otherwise

Search results