src/VIPSoft/Unzip/Unzip.php
public function extract($zipFile, $targetPath)
    {
        $zipArchive = $this->openZipFile($zipFile);
        $targetPath = $this->fixPath($targetPath);
        $filenames  = $this->extractFilenames($zipArchive);

        if ($zipArchive->extractTo($targetPath, $filenames) === false) {
            throw new \Exception($this->getError($zipArchive->status));
        }

        $zipArchive->close();

        return $filenames;
    }
public function extract($zipFile, $targetPath)
    {
        $zipArchive = $this->openZipFile($zipFile);
        $targetPath = $this->fixPath($targetPath);
        $filenames  = $this->extractFilenames($zipArchive);

        if ($zipArchive->extractTo($targetPath, $filenames) === false) {
            throw new \Exception($this->getError($zipArchive->status));
        }

        $zipArchive->close();

        return $filenames;
    }
public function extract ( $ zipFile , $ targetPath ) { $ zipArchive = $ this -> openZipFile ( $ zipFile ) ; $ targetPath = $ this -> fixPath ( $ targetPath ) ; $ filenames = $ this -> extractFilenames ( $ zipArchive ) ; if ( $ zipArchive -> extractTo ( $ targetPath , $ filenames ) === false ) { throw new \ Exception ( $ this -> getError ( $ zipArchive -> status ) ) ; } $ zipArchive -> close ( ) ; return $ filenames ; }
Extract zip file to target path

@param string $zipFile    Path of .zip file
@param string $targetPath Extract to this target (destination) path

@return mixed Array of filenames corresponding to the extracted files

@throw \Exception
Extract zip file to target path