Gitignore
in package
Gitignore matches against text.
Tags
Table of Contents
- toRegex() : string
- Returns a regexp which is the equivalent of the gitignore pattern.
- lineToRegex() : string
Methods
toRegex()
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
Parameters
- $gitignoreFileContent : string
Return values
string —lineToRegex()
private
static lineToRegex(string $gitignoreLine) : string
Parameters
- $gitignoreLine : string