protected function filterZipFiles(ZipArchive $archive, array $ignore = [], array $force = [])
    {
        $dirName = $archive->getNameIndex(0);
        $return = [];
        $numFiles = $archive->getNumFiles();
        for ($i = 0; $i < $numFiles; ++$i) {
            $stat = $archive->statIndex($i);
            $return[] = $stat['name'];
        }
        $that = $this;
        $filter = array_filter($return, function ($var) use ($ignore, $force, $dirName, $that) {
            return !$that->isIgnored($var, $ignore, $force, $dirName);
        });

        return array_values($filter);
    }
protected function filterZipFiles(ZipArchive $archive, array $ignore = [], array $force = [])
    {
        $dirName = $archive->getNameIndex(0);
        $return = [];
        $numFiles = $archive->getNumFiles();
        for ($i = 0; $i < $numFiles; ++$i) {
            $stat = $archive->statIndex($i);
            $return[] = $stat['name'];
        }
        $that = $this;
        $filter = array_filter($return, function ($var) use ($ignore, $force, $dirName, $that) {
            return !$that->isIgnored($var, $ignore, $force, $dirName);
        });

        return array_values($filter);
    }
protected function filterZipFiles ( ZipArchive $ archive , array $ ignore = [ ] , array $ force = [ ] ) { $ dirName = $ archive -> getNameIndex ( 0 ) ; $ return = [ ] ; $ numFiles = $ archive -> getNumFiles ( ) ; for ( $ i = 0 ; $ i < $ numFiles ; ++ $ i ) { $ stat = $ archive -> statIndex ( $ i ) ; $ return [ ] = $ stat [ 'name' ] ; } $ that = $ this ; $ filter = array_filter ( $ return , function ( $ var ) use ( $ ignore , $ force , $ dirName , $ that ) { return ! $ that -> isIgnored ( $ var , $ ignore , $ force , $ dirName ) ; } ) ; return array_values ( $ filter ) ; }
Filter archive files based on an "ignore" list.

@param  ZipArchive $archive
@param  array      $ignore
@param  array      $force
@return array
Filter archive files based on an ignore list .