ModuleInstallerLauncher
in package
Manage status of a module and its installer/updaters.
Tags
Table of Contents
- CONFIGURATOR_TO_CONFIGURE = 0
- CONFIGURATOR_TO_UNCONFIGURE = 1
- $inError : mixed
- code error of the installation.
- $globalSetup : GlobalSetup
- $jelixMaxVersion : string
- $jelixMinVersion : string
- $moduleConfigurator : Configurator
- $moduleInfos : ModuleInfos
- informations of the modules from their module.xml.
- $moduleInstaller : jInstallerModule|Installer
- $moduleMainUpgrader : jInstallerModule|Installer
- $moduleStatus : ModuleStatus
- status of modules into the application.
- $moduleUninstaller : jInstallerModule|Uninstaller
- $moduleUpgraders : array<string|int, jInstallerModule>|array<string|int, Installer>
- $name : string
- $upgradersContexts : mixed
- __construct() : mixed
- backupUninstallScript() : bool
- Backup the uninstall.php outside the module.
- checkJelixVersion() : mixed
- checkVersion() : mixed
- getConfigurator() : null|Configurator
- instancies the object which is responsible to configure the module.
- getDbProfile() : mixed
- getDependencies() : mixed
- getIncompatibilities() : mixed
- getInstalledVersion() : mixed
- getInstaller() : null|jIInstallerComponent|InstallerInterface
- instancies the object which is responsible to install the module.
- getInstallParameters() : array<string|int, string>
- getJelixVersion() : mixed
- getModuleInfos() : mixed
- getModuleStatus() : mixed
- getName() : mixed
- getPath() : mixed
- getSourceDate() : mixed
- getSourceVersion() : mixed
- getUninstaller() : null|jIInstallerComponent|UninstallerInterface
- instancies the object which is responsible to uninstall the module.
- getUpgraders() : array<string|int, jIInstallerComponent>|array<string|int, InstallerInterface>
- return the list of objects which are responsible to upgrade the module from the current installed version of the module.
- hasUninstallScript() : mixed
- init() : mixed
- initialize the object, by reading the identity file.
- installFinished() : mixed
- isEnabled() : mixed
- isEnabledOnlyInLocalConfiguration() : mixed
- isInstalled() : mixed
- isUpgraded() : bool
- saveModuleStatus() : mixed
- save module infos into the app config or the local config.
- setInstalledVersion() : mixed
- setInstallParameters() : mixed
- Set installation parameters into module infos.
- uninstallFinished() : mixed
- upgradeFinished() : mixed
- _formatDate() : mixed
- checkUpgraderValidity() : false|string
- createConfigurator() : mixed
Constants
CONFIGURATOR_TO_CONFIGURE
public
mixed
CONFIGURATOR_TO_CONFIGURE
= 0
CONFIGURATOR_TO_UNCONFIGURE
public
mixed
CONFIGURATOR_TO_UNCONFIGURE
= 1
Properties
$inError
code error of the installation.
public
mixed
$inError
= 0
$globalSetup
protected
GlobalSetup
$globalSetup
$jelixMaxVersion
protected
string
$jelixMaxVersion
= '*'
the maximum version of jelix for which the component is compatible
$jelixMinVersion
protected
string
$jelixMinVersion
= '*'
the minimum version of jelix for which the component is compatible
$moduleConfigurator
protected
Configurator
$moduleConfigurator
$moduleInfos
informations of the modules from their module.xml.
protected
ModuleInfos
$moduleInfos
$moduleInstaller
protected
jInstallerModule|Installer
$moduleInstaller
$moduleMainUpgrader
protected
jInstallerModule|Installer
$moduleMainUpgrader
$moduleStatus
status of modules into the application.
protected
ModuleStatus
$moduleStatus
$moduleUninstaller
protected
jInstallerModule|Uninstaller
$moduleUninstaller
$moduleUpgraders
protected
array<string|int, jInstallerModule>|array<string|int, Installer>
$moduleUpgraders
$name
protected
string
$name
= ''
name of the module
$upgradersContexts
protected
mixed
$upgradersContexts
= array()
Methods
__construct()
public
__construct(ModuleStatus $moduleStatus, GlobalSetup $globalSetup) : mixed
Parameters
- $moduleStatus : ModuleStatus
- $globalSetup : GlobalSetup
Return values
mixed —backupUninstallScript()
Backup the uninstall.php outside the module.
public
backupUninstallScript() : bool
It allows to run the uninstall.php script of the module, even if the module does not exist anymore. This could be the case when the module is bundled into a composer package, and we removed the composer package from composer.json before deploying the application. The script is copied into the app:install/uninstall/ directory.
For some components that don't have an uninstaller script, we should reference them into uninstaller.ini.php anyway, because we need their information because they are reverse dependencies of another module we should uninstall.
Return values
bool —true if there is an uninstall.php script
checkJelixVersion()
public
checkJelixVersion(mixed $jelixVersion) : mixed
Parameters
- $jelixVersion : mixed
Return values
mixed —checkVersion()
public
checkVersion(mixed $min, mixed $max) : mixed
Parameters
- $min : mixed
- $max : mixed
Return values
mixed —getConfigurator()
instancies the object which is responsible to configure the module.
public
getConfigurator(int $actionMode[, bool $forLocalConfiguration = null ][, null|mixed $installParameters = null ]) : null|Configurator
Parameters
- $actionMode : int
-
one of CONFIGURATOR_TO_* constants
- $forLocalConfiguration : bool = null
-
true if the configuration should be done with the local configuration, else it will be done with the main configuration
- $installParameters : null|mixed = null
Tags
Return values
null|Configurator —the configurator, or null if there isn't any configurator
getDbProfile()
public
getDbProfile() : mixed
Return values
mixed —getDependencies()
public
getDependencies() : mixed
Return values
mixed —getIncompatibilities()
public
getIncompatibilities() : mixed
Return values
mixed —getInstalledVersion()
public
getInstalledVersion() : mixed
Return values
mixed —getInstaller()
instancies the object which is responsible to install the module.
public
getInstaller() : null|jIInstallerComponent|InstallerInterface
Tags
Return values
null|jIInstallerComponent|InstallerInterface —the installer, or null if there isn't any installer
getInstallParameters()
public
getInstallParameters() : array<string|int, string>
Return values
array<string|int, string> —getJelixVersion()
public
getJelixVersion() : mixed
Return values
mixed —getModuleInfos()
public
getModuleInfos() : mixed
Return values
mixed —getModuleStatus()
public
getModuleStatus() : mixed
Return values
mixed —getName()
public
getName() : mixed
Return values
mixed —getPath()
public
getPath() : mixed
Return values
mixed —getSourceDate()
public
getSourceDate() : mixed
Return values
mixed —getSourceVersion()
public
getSourceVersion() : mixed
Return values
mixed —getUninstaller()
instancies the object which is responsible to uninstall the module.
public
getUninstaller() : null|jIInstallerComponent|UninstallerInterface
Tags
Return values
null|jIInstallerComponent|UninstallerInterface —the uninstaller, or null if there isn't any uninstaller
getUpgraders()
return the list of objects which are responsible to upgrade the module from the current installed version of the module.
public
getUpgraders() : array<string|int, jIInstallerComponent>|array<string|int, InstallerInterface>
this method should be called after verifying and resolving dependencies. Needed modules should be installed/upgraded before calling this method
Tags
Return values
array<string|int, jIInstallerComponent>|array<string|int, InstallerInterface> —hasUninstallScript()
public
hasUninstallScript() : mixed
Return values
mixed —init()
initialize the object, by reading the identity file.
public
init() : mixed
Return values
mixed —installFinished()
public
installFinished() : mixed
Return values
mixed —isEnabled()
public
isEnabled() : mixed
Return values
mixed —isEnabledOnlyInLocalConfiguration()
public
isEnabledOnlyInLocalConfiguration() : mixed
Return values
mixed —isInstalled()
public
isInstalled() : mixed
Return values
mixed —isUpgraded()
public
isUpgraded() : bool
Tags
Return values
bool —saveModuleStatus()
save module infos into the app config or the local config.
public
saveModuleStatus() : mixed
Return values
mixed —setInstalledVersion()
public
setInstalledVersion(mixed $version) : mixed
Parameters
- $version : mixed
Return values
mixed —setInstallParameters()
Set installation parameters into module infos.
public
setInstallParameters(array<string|int, string> $parameters) : mixed
Parameters
- $parameters : array<string|int, string>
Return values
mixed —uninstallFinished()
public
uninstallFinished() : mixed
Return values
mixed —upgradeFinished()
public
upgradeFinished(mixed $upgrader) : mixed
Parameters
- $upgrader : mixed
Return values
mixed —_formatDate()
protected
_formatDate(mixed $date) : mixed
Parameters
- $date : mixed
Return values
mixed —checkUpgraderValidity()
protected
checkUpgraderValidity(string $currentVersion, string $currentVersionDate, string $newVersion, string $newVersionDate, array<string|int, string> $upgraderTargetVersions, string $upgraderDate) : false|string
Parameters
- $currentVersion : string
- $currentVersionDate : string
- $newVersion : string
- $newVersionDate : string
- $upgraderTargetVersions : array<string|int, string>
- $upgraderDate : string
Return values
false|string —createConfigurator()
protected
createConfigurator([mixed $installParameters = null ]) : mixed
Parameters
- $installParameters : mixed = null