protected function filter($path, array $patterns)
    {
        foreach ($patterns as $pattern) {
            if ($pattern[0] == '!' ? !fnmatch(substr($pattern, 1), $path) : fnmatch($pattern, $path)) {
                return false;
            }
        }

        return true;
    }
protected function filter($path, array $patterns)
    {
        foreach ($patterns as $pattern) {
            if ($pattern[0] == '!' ? !fnmatch(substr($pattern, 1), $path) : fnmatch($pattern, $path)) {
                return false;
            }
        }

        return true;
    }
protected function filter ( $ path , array $ patterns ) { foreach ( $ patterns as $ pattern ) { if ( $ pattern [ 0 ] == '!' ? ! fnmatch ( substr ( $ pattern , 1 ) , $ path ) : fnmatch ( $ pattern , $ path ) ) { return false ; } } return true ; }
Filters the given path.

@param array $patterns
@return bool
Filters the given path .