FileFetcherUploadZip

Extends\LimeSurvey\ExtensionInstaller\FileFetcher

Extension file fetcher for upload ZIP file.

Must work for all extension types: plugins, theme, question theme, etc.

since 2018-09-25
author

Olle Haerstedt

package

Default

Methods

Abort procedure, remove temporary files.

abort(): void
inheritedabstract

checkFileSizeError

checkFileSizeError(): void
todo

Duplicate from themes.php.

Throws
\LimeSurvey\ExtensionInstaller\Exception

Check if uploaded zip file is a zip bomb.

checkZipBom(): void

Set user session tempdir to null.

clearTmpdir(): void

extractZipFile

extractZipFile(string $tempdir): void

Arguments

$tempdir

string

Move files from source to tmp/ folder.

fetch(): void
inheritedabstract

getConfig

getConfig(): \LimeSurvey\ExtensionInstaller\ExtensionConfig
inheritedabstract
Throws
\LimeSurvey\ExtensionInstaller\Exception

if config cannot be parsed.

Response

\LimeSurvey\ExtensionInstaller\ExtensionConfig

Get tmp tempdir for extension to unzip in.

getTempdir(): string

Response

string

Move files from tmp/ folder to final destination.

move(string $destdir): boolean
inheritedabstract

Arguments

$destdir

string

Response

boolean

Recursively copy source folder $src to destination $dest.

recurseCopy(string $src,string $dest): boolean
see https://stackoverflow.com/questions/2050859/copy-entire-contents-of-a-directory-to-another-using-php

Arguments

$src

string

$dest

string

Response

boolean

Set source for this file fetcher.

setSource(string $source): void
inheritedabstract

Can be ZIP file name, git repo URL, folder name, etc.

Arguments

$source

string

setUnzipFilter

setUnzipFilter(string $filterName): void

Arguments

$filterName

string

Properties

Filter to apply to unzipping.

filterName :string
var

Type(s)

string