QuestionThemeInstaller
extends ExtensionInstaller
in package
Base class for different extension installers.
All extension have this in common:
- Upload ZIP file or grab files from web (e.g. git repo)
- Read config.xml
- If config.xml is valid and the extension compatible with current version of LimeSurvey, then -- Copy files to correct folder (depends on extension type) -- Insert database row (depends on extension type)
Table of Contents
Properties
- $fileFetcher : FileFetcher
- Class responsible for fetching files from source.
Methods
- abort() : void
- When installation procedure was not completed, abort changes.
- fetchFiles() : void
- Order the file fetcher to fetch files.
- getConfig() : ExtensionConfig
- Get the configuration from temp dir.
- install() : void
- Installs new question theme.
- setFileFetcher() : void
- uninstall() : void
- Uninstall the extension.
- update() : void
- Update an existing question theme.
- getXmlFolder() : string|null
- Returns absolute path of folder inside $destdir that has config.xml in it.
Properties
$fileFetcher
Class responsible for fetching files from source.
protected
FileFetcher
$fileFetcher
Methods
abort()
When installation procedure was not completed, abort changes.
public
abort() : void
fetchFiles()
Order the file fetcher to fetch files.
public
fetchFiles() : void
Tags
getConfig()
Get the configuration from temp dir.
public
getConfig() : ExtensionConfig
Tags
Return values
ExtensionConfiginstall()
Installs new question theme.
public
install() : void
Assumes it has been checked that is not already installed. If it is, use update() instead.
setFileFetcher()
public
setFileFetcher(FileFetcher $fileFetcher) : void
Parameters
- $fileFetcher : FileFetcher
uninstall()
Uninstall the extension.
public
uninstall() : void
Tags
update()
Update an existing question theme.
public
update() : void
Tags
getXmlFolder()
Returns absolute path of folder inside $destdir that has config.xml in it.
protected
getXmlFolder(string $dir) : string|null
Parameters
- $dir : string
-
Root dir of question theme
Return values
string|null —Folder as string if config.xml is found; otherwise null