__construct() __construct(string $gitignore, string $root) Constructor. Parameters string $gitignore The gitignore information string $root The root position for the files that should be checked.
getIgnores() getIgnores() : array Return the list of ignored patterns. Returns array — The list of patterns.
getIncludes() getIncludes() : array Return the list of included patterns. Returns array — The list of patterns.
isIgnored() isIgnored(\SplFileInfo $element) : boolean Tell whether to ignore the element. Parameters \SplFileInfo $element The element to check. Returns boolean — True if the element should be ignored, false otherwise.
_prepare() _prepare(string $gitignore) : NULL Prepare the list of ignores and includes from the gitignore input. Parameters string $gitignore The content of the .gitignore file. Returns NULL
_matches() _matches(array $matches, string $path) : NULL Does the given path match one of the regular expression patterns? Parameters array $matches The regular expression patterns. string $path The file path. Returns NULL
_getRegExpableSearchString() _getRegExpableSearchString(string $s) : string Converts $s into a string that can be used with preg_match Parameters string $s string with wildcards ? and * Returns string — converts to ., ? to ., etc.