Documentation

Gitignore
in package

Gitignore matches against text.

Tags
author

Michael Voříšek vorismi3@fel.cvut.cz

author

Ahmed Abdou mail@ahmd.io

Table of Contents

Methods

toRegex()  : string
Returns a regexp which is the equivalent of the gitignore pattern.
toRegexMatchingNegatedPatterns()  : string
buildRegex()  : string
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

toRegexMatchingNegatedPatterns()

public static toRegexMatchingNegatedPatterns(string $gitignoreFileContent) : string
Parameters
$gitignoreFileContent : string
Return values
string

buildRegex()

private static buildRegex(string $gitignoreFileContent, bool $inverted) : string
Parameters
$gitignoreFileContent : string
$inverted : bool
Return values
string

lineToRegex()

private static lineToRegex(string $gitignoreLine) : string
Parameters
$gitignoreLine : string
Return values
string

        
On this page

Search results