Ejemplo n.º 1
0
 /**
  * exclude the ignored directories and files.
  *
  * @param AssetInterface $asset_holder
  */
 private function excludeThis(AssetInterface $asset_holder)
 {
     // add or ignore hidden directories
     $this->ignoreDotFiles($asset_holder->getExcludeHidden());
     // exclude ignored files
     foreach ($asset_holder->getExcludedFiles() as $name) {
         $this->notName($name);
     }
     // exclude files (if exist) with this extensions
     $excluded_extensions = $asset_holder->getExcludedExtensions();
     if (!empty($excluded_extensions)) {
         foreach ($asset_holder->getExcludedExtensions() as $extension) {
             $this->notName('*' . $extension);
         }
     }
     // exclude the regex pattern
     foreach ($asset_holder->getExcludedPatterns() as $pattern) {
         $this->notName($pattern);
     }
 }