Gitignore matches against text.
- Full name:
\Symfony\Component\Finder\Gitignore
Returns a regexp which is the equivalent of the gitignore pattern.
public static toRegex(string $gitignoreFileContent): string
Format specification: https://git-scm.com/docs/gitignore#_pattern_format
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$gitignoreFileContent |
string |
public static toRegexMatchingNegatedPatterns(string $gitignoreFileContent): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$gitignoreFileContent |
string |
private static buildRegex(string $gitignoreFileContent, bool $inverted): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$gitignoreFileContent |
string | |
$inverted |
bool |
private static lineToRegex(string $gitignoreLine): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$gitignoreLine |
string |