ChangedFilesIterator
extends FilterIterator
in package
Iterator used to filter an internal iterator to only yield files that do not exist in the target iterator or files that have changed
Table of Contents
Properties
- $cache : array<string|int, mixed>
- $sourceConverter : FilenameConverterInterface
- $sourceIterator : Iterator
- $targetConverter : FilenameConverterInterface
- $targetIterator : Iterator
Methods
- __construct() : mixed
- accept() : mixed
- getUnmatched() : array<string|int, mixed>
- Returns an array of the files from the target iterator that were not found in the source iterator
- getTargetData() : array<string|int, mixed>|bool
- Get key information from the target iterator for a particular filename
- cleanKey() : mixed
- normalize() : mixed
Properties
$cache
protected
array<string|int, mixed>
$cache
= array()
Previously loaded data
$sourceConverter
protected
FilenameConverterInterface
$sourceConverter
$sourceIterator
protected
Iterator
$sourceIterator
$targetConverter
protected
FilenameConverterInterface
$targetConverter
$targetIterator
protected
Iterator
$targetIterator
Methods
__construct()
public
__construct(Iterator $sourceIterator, Iterator $targetIterator, FilenameConverterInterface $sourceConverter, FilenameConverterInterface $targetConverter) : mixed
Parameters
- $sourceIterator : Iterator
-
Iterator to wrap and filter
- $targetIterator : Iterator
-
Iterator used to compare against the source iterator
- $sourceConverter : FilenameConverterInterface
-
Key converter to convert source to target keys
- $targetConverter : FilenameConverterInterface
-
Key converter to convert target to source keys
accept()
public
accept() : mixed
getUnmatched()
Returns an array of the files from the target iterator that were not found in the source iterator
public
getUnmatched() : array<string|int, mixed>
Return values
array<string|int, mixed>getTargetData()
Get key information from the target iterator for a particular filename
protected
getTargetData(string $key) : array<string|int, mixed>|bool
Parameters
- $key : string
-
Target iterator filename
Return values
array<string|int, mixed>|bool —Returns an array of data, or false if the key is not in the iterator
cleanKey()
private
cleanKey(mixed $key) : mixed
Parameters
- $key : mixed
normalize()
private
normalize(mixed $current) : mixed
Parameters
- $current : mixed