VcsIgnoredFilterIterator
extends FilterIterator
in package
FinalYes
Tags
Table of Contents
Properties
- $baseDir : string
- $gitignoreFilesCache : array<string, array{0: string, 1: string}|null>
- $ignoredPathsCache : array<string, bool>
Methods
- __construct() : mixed
- accept() : bool
- isIgnored() : bool
- normalizePath() : string
- parentDirectoriesDownwards() : array<int, string>
- parentDirectoriesUpTo() : array<string|int, mixed>
- parentDirectoriesUpwards() : array<int, string>
- readGitignoreFile() : array{0: string, 1: string}|null
Properties
$baseDir
private
string
$baseDir
$gitignoreFilesCache
private
array<string, array{0: string, 1: string}|null>
$gitignoreFilesCache
= []
$ignoredPathsCache
private
array<string, bool>
$ignoredPathsCache
= []
Methods
__construct()
public
__construct(Iterator<string, SplFileInfo> $iterator, string $baseDir) : mixed
Parameters
- $iterator : Iterator<string, SplFileInfo>
- $baseDir : string
accept()
public
accept() : bool
Return values
boolisIgnored()
private
isIgnored(string $fileRealPath) : bool
Parameters
- $fileRealPath : string
Return values
boolnormalizePath()
private
normalizePath(string $path) : string
Parameters
- $path : string
Return values
stringparentDirectoriesDownwards()
private
parentDirectoriesDownwards(string $fileRealPath) : array<int, string>
Parameters
- $fileRealPath : string
Return values
array<int, string>parentDirectoriesUpTo()
private
parentDirectoriesUpTo(string $from, string $upTo) : array<string|int, mixed>
Parameters
- $from : string
- $upTo : string
Return values
array<string|int, mixed>parentDirectoriesUpwards()
private
parentDirectoriesUpwards(string $from) : array<int, string>
Parameters
- $from : string
Return values
array<int, string>readGitignoreFile()
private
readGitignoreFile(string $path) : array{0: string, 1: string}|null
Parameters
- $path : string