Class Symfony\Component\Finder\Iterator\DepthRangeFilterIterator

InheritanceSymfony\Component\Finder\Iterator\DepthRangeFilterIterator » Symfony\Component\Finder\Iterator\FilterIterator » FilterIterator

DepthRangeFilterIterator limits the directory depth.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Constructor. Symfony\Component\Finder\Iterator\DepthRangeFilterIterator
accept() Filters the iterator values. Symfony\Component\Finder\Iterator\DepthRangeFilterIterator
rewind() This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after rewind in some cases. Symfony\Component\Finder\Iterator\FilterIterator

Method Details

__construct() public method


public void __construct ( RecursiveIteratorIterator $iterator, $minDepth 0, $maxDepth PHP_INT_MAX )
$iterator RecursiveIteratorIterator

The Iterator to filter

$minDepth int

The min depth

$maxDepth int

The max depth

accept() public method

Filters the iterator values.

public bool accept ( )
return bool

True if the value should be kept, false otherwise