class CustomFilterIterator extends FilterIterator

CustomFilterIterator filters files by applying anonymous functions.

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

Methods

__construct(Iterator $iterator, array $filters)

No description

bool
accept()

Filters the iterator values.

Details

at line 32
__construct(Iterator $iterator, array $filters)

Parameters

Iterator $iterator The Iterator to filter
array $filters An array of PHP callbacks

Exceptions

InvalidArgumentException

at line 49
bool accept()

Filters the iterator values.

Return Value

bool true if the value should be kept, false otherwise