Jelix 1.7.18

ModuleInstallerLauncher
in package

Manage status of a module and its installer/updaters.

Tags
since
1.7

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

Properties

$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

Methods

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
throws
Exception

when configurator class not found

Return values
null|Configurator

the configurator, or null if there isn't any configurator

getInstallParameters()

public getInstallParameters() : array<string|int, string>
Return values
array<string|int, string>

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
throws
Exception

if an error occurs during the install

Return values
array<string|int, jIInstallerComponent>|array<string|int, InstallerInterface>

init()

initialize the object, by reading the identity file.

public init() : mixed
Return values
mixed

isEnabledOnlyInLocalConfiguration()

public isEnabledOnlyInLocalConfiguration() : mixed
Return values
mixed

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

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
Return values
mixed

Search results