public function extract()
    {
        $content = '';
        $folder = tao_helpers_File::createTempDir();
        $zip = new ZipArchive();
        $source = $this->getExtractedSource();
        if ($zip->open($source) === true) {
            if (tao_helpers_File::checkWhetherArchiveIsBomb($zip)) {
                throw new \common_Exception(sprintf('Source "%s" seems to be a ZIP bomb', $source));
            }
            if ($zip->extractTo($folder)) {
                $content = $folder;
            }
            $zip->close();
        }

        return $content;
    }
public function extract()
    {
        $content = '';
        $folder = tao_helpers_File::createTempDir();
        $zip = new ZipArchive();
        $source = $this->getExtractedSource();
        if ($zip->open($source) === true) {
            if (tao_helpers_File::checkWhetherArchiveIsBomb($zip)) {
                throw new \common_Exception(sprintf('Source "%s" seems to be a ZIP bomb', $source));
            }
            if ($zip->extractTo($folder)) {
                $content = $folder;
            }
            $zip->close();
        }

        return $content;
    }
public function extract ( ) { $ content = '' ; $ folder = tao_helpers_File :: createTempDir ( ) ; $ zip = new ZipArchive ( ) ; $ source = $ this -> getExtractedSource ( ) ; if ( $ zip -> open ( $ source ) === true ) { if ( tao_helpers_File :: checkWhetherArchiveIsBomb ( $ zip ) ) { throw new \ common_Exception ( sprintf ( 'Source "%s" seems to be a ZIP bomb' , $ source ) ) ; } if ( $ zip -> extractTo ( $ folder ) ) { $ content = $ folder ; } $ zip -> close ( ) ; } return $ content ; }
Extract the zip archive and return the path to extracted package

@return string
@throws \common_exception
Extract the zip archive and return the path to extracted package