예제 #1
0
 public function __construct($sourcePath)
 {
     parent::__construct($sourcePath);
     if (file_exists($sourcePath . '/.gitignore')) {
         $this->excludePatterns = $this->parseLines(file($sourcePath . '/.gitignore'), array($this, 'parseGitIgnoreLine'));
     }
     if (file_exists($sourcePath . '/.gitattributes')) {
         $this->excludePatterns = array_merge($this->excludePatterns, $this->parseLines(file($sourcePath . '/.gitattributes'), array($this, 'parseGitAttributesLine')));
     }
 }
 /**
  * @param string $sourcePath Directory containing sources to be filtered
  * @param array $excludeRules An array of exclude rules from composer.json
  */
 public function __construct($sourcePath, array $excludeRules)
 {
     parent::__construct($sourcePath);
     $this->excludePatterns = $this->generatePatterns($excludeRules);
 }