ExtensionInstaller
in package
AbstractYes
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)
Tags
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|null
- Get the configuration from temp dir.
- install() : void
- Install extension, which includes moving files from temp dir to final dir, and creating the necessary database changes.
- setFileFetcher() : void
- uninstall() : void
- Uninstall the extension.
- update() : void
- Update extension.
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|null
Before an extension is installed, we need to read the config file. That's why the extension if fetched into a temp folder first.
Return values
ExtensionConfig|nullinstall()
Install extension, which includes moving files from temp dir to final dir, and creating the necessary database changes.
public
abstract install() : void
setFileFetcher()
public
setFileFetcher(FileFetcher $fileFetcher) : void
Parameters
- $fileFetcher : FileFetcher
uninstall()
Uninstall the extension.
public
abstract uninstall() : void
update()
Update extension.
public
abstract update() : void