Class Symfony\Component\Finder\Iterator\FileTypeFilterIterator

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

FileTypeFilterIterator only keeps files, directories, or both.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Constructor. Symfony\Component\Finder\Iterator\FileTypeFilterIterator
accept() Filters the iterator values. Symfony\Component\Finder\Iterator\FileTypeFilterIterator
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 ( Iterator $iterator, $mode )
$iterator Iterator

The Iterator to filter

$mode int

The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)

accept() public method

Filters the iterator values.

public bool accept ( )
return bool

True if the value should be kept, false otherwise