\Symfony\Component\FinderGitignore

Gitignore matches against text.

Summary

Methods
Properties
Constants
toRegex()
toRegexMatchingNegatedPatterns()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
buildRegex()
lineToRegex()
No private properties found
N/A

Methods

toRegex()

toRegex(string  $gitignoreFileContent) : string

Returns a regexp which is the equivalent of the gitignore pattern.

Format specification: https://git-scm.com/docs/gitignore#_pattern_format

Parameters

string $gitignoreFileContent

Returns

string —

toRegexMatchingNegatedPatterns()

toRegexMatchingNegatedPatterns(string  $gitignoreFileContent) : string

Parameters

string $gitignoreFileContent

Returns

string —

buildRegex()

buildRegex(string  $gitignoreFileContent, bool  $inverted) : string

Parameters

string $gitignoreFileContent
bool $inverted

Returns

string —

lineToRegex()

lineToRegex(string  $gitignoreLine) : string

Parameters

string $gitignoreLine

Returns

string —