PHP Class Horde_Pear_Package_Contents_Ignore_Git, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Inheritance: implements Horde_Pear_Package_Contents_Ignore
Afficher le fichier Open project: horde/horde

Méthodes publiques

Méthode Description
__construct ( string $gitignore, string $root ) Constructor.
getIgnores ( ) : array Return the list of ignored patterns.
getIncludes ( ) : array Return the list of included patterns.
isIgnored ( SplFileInfo $element ) : boolean Tell whether to ignore the element.

Private Methods

Méthode Description
_getRegExpableSearchString ( string $s ) : string Converts $s into a string that can be used with preg_match
_matches ( array $matches, string $path ) : null Does the given path match one of the regular expression patterns?
_prepare ( string $gitignore ) : null Prepare the list of ignores and includes from the gitignore input.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $gitignore, string $root )
$gitignore string The gitignore information
$root string The root position for the files that should be checked.

getIgnores() public méthode

Return the list of ignored patterns.
public getIgnores ( ) : array
Résultat array The list of patterns.

getIncludes() public méthode

Return the list of included patterns.
public getIncludes ( ) : array
Résultat array The list of patterns.

isIgnored() public méthode

Tell whether to ignore the element.
public isIgnored ( SplFileInfo $element ) : boolean
$element SplFileInfo The element to check.
Résultat boolean True if the element should be ignored, false otherwise.