public static function filterFiles($args, $allowWildcards = true)
    {
        $files = array();
        foreach ($args as $arg) {
            if (file_exists($arg)) {
                $files[] = $arg;
            } else if ($allowWildcards && strpos($arg, '*') !== false) {
                $files = array_merge($files, glob($arg));
            }
        }
        return $files;
    }
public static function filterFiles($args, $allowWildcards = true)
    {
        $files = array();
        foreach ($args as $arg) {
            if (file_exists($arg)) {
                $files[] = $arg;
            } else if ($allowWildcards && strpos($arg, '*') !== false) {
                $files = array_merge($files, glob($arg));
            }
        }
        return $files;
    }
public static function filterFiles ( $ args , $ allowWildcards = true ) { $ files = array ( ) ; foreach ( $ args as $ arg ) { if ( file_exists ( $ arg ) ) { $ files [ ] = $ arg ; } else if ( $ allowWildcards && strpos ( $ arg , '*' ) !== false ) { $ files = array_merge ( $ files , glob ( $ arg ) ) ; } } return $ files ; }
Extracts files from an array of args

@param array $args
@param bool $allowWildcards Whether wildcards are allowed
@return array
Extracts files from an array of args