public function extract(
        string $destination,
        bool $separate = true,
        $files = null
    ): bool {

        try {
            foreach ( $this->zip_archives as $archive ) {

                $local_path = substr($destination, -1) == '/' ? $destination : $destination.'/';
                $local_file = pathinfo($archive->getZipFile());
                $local_destination = $separate ? ($local_path.$local_file['filename']) : $destination;

                $archive->extract($local_destination, $files);

            }
            return true;
        } catch (ZipException $ze) {
            throw $ze;
        }

    }
public function extract(
        string $destination,
        bool $separate = true,
        $files = null
    ): bool {

        try {
            foreach ( $this->zip_archives as $archive ) {

                $local_path = substr($destination, -1) == '/' ? $destination : $destination.'/';
                $local_file = pathinfo($archive->getZipFile());
                $local_destination = $separate ? ($local_path.$local_file['filename']) : $destination;

                $archive->extract($local_destination, $files);

            }
            return true;
        } catch (ZipException $ze) {
            throw $ze;
        }

    }
public function extract ( string $ destination , bool $ separate = true , $ files = null ) : bool { try { foreach ( $ this -> zip_archives as $ archive ) { $ local_path = substr ( $ destination , - 1 ) == '/' ? $ destination : $ destination . '/' ; $ local_file = pathinfo ( $ archive -> getZipFile ( ) ) ; $ local_destination = $ separate ? ( $ local_path . $ local_file [ 'filename' ] ) : $ destination ; $ archive -> extract ( $ local_destination , $ files ) ; } return true ; } catch ( ZipException $ ze ) { throw $ ze ; } }
Extract Zips to common destination

@param string $destination Destination path
@param bool $separate (optional) If true (default), files will be placed in different directories
@param mixed $files (optional) a filename or an array of filenames

@return bool
@throws ZipException
Extract Zips to common destination