ExcludeDirectoryFilterIterator
extends FilterIterator
in package
implements
RecursiveIterator
ExcludeDirectoryFilterIterator filters out directories.
Tags
Table of Contents
Interfaces
- RecursiveIterator
Properties
- $excludedDirs : mixed
- $excludedPattern : mixed
- $isRecursive : mixed
- $iterator : mixed
Methods
- __construct() : mixed
- Constructor.
- accept() : bool
- Filters the iterator values.
- getChildren() : mixed
- hasChildren() : mixed
- rewind() : mixed
- This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after rewind in some cases.
Properties
$excludedDirs
private
mixed
$excludedDirs
= array()
$excludedPattern
private
mixed
$excludedPattern
$isRecursive
private
mixed
$isRecursive
$iterator
private
mixed
$iterator
Methods
__construct()
Constructor.
public
__construct(Iterator $iterator, array<string|int, mixed> $directories) : mixed
Parameters
- $iterator : Iterator
-
The Iterator to filter
- $directories : array<string|int, mixed>
-
An array of directories to exclude
accept()
Filters the iterator values.
public
accept() : bool
Return values
bool —True if the value should be kept, false otherwise
getChildren()
public
getChildren() : mixed
hasChildren()
public
hasChildren() : mixed
rewind()
This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after rewind in some cases.
public
rewind() : mixed