protected function unzipModule(UploadedFile $file)
    {
        $extractPath = false;
        $zip = new ZipArchiver(true);
        if (!$zip->open($file->getRealPath())) {
            throw new \Exception("unable to open zipfile");
        }

        $extractPath = $this->tempdir();

        if ($extractPath !== false) {
            if ($zip->extract($extractPath) === false) {
                $extractPath = false;
            }
        }

        $zip->close();

        return $extractPath;
    }
protected function unzipModule(UploadedFile $file)
    {
        $extractPath = false;
        $zip = new ZipArchiver(true);
        if (!$zip->open($file->getRealPath())) {
            throw new \Exception("unable to open zipfile");
        }

        $extractPath = $this->tempdir();

        if ($extractPath !== false) {
            if ($zip->extract($extractPath) === false) {
                $extractPath = false;
            }
        }

        $zip->close();

        return $extractPath;
    }
protected function unzipModule ( UploadedFile $ file ) { $ extractPath = false ; $ zip = new ZipArchiver ( true ) ; if ( ! $ zip -> open ( $ file -> getRealPath ( ) ) ) { throw new \ Exception ( "unable to open zipfile" ) ; } $ extractPath = $ this -> tempdir ( ) ; if ( $ extractPath !== false ) { if ( $ zip -> extract ( $ extractPath ) === false ) { $ extractPath = false ; } } $ zip -> close ( ) ; return $ extractPath ; }
Unzip a module file.

@param UploadedFile $file

@return string|bool the path where the module has been extracted or false if an error has occured
Unzip a module file .