ModuleInstallerLauncher

Manage status of a module and its installer/updaters.

since 1.7
package

Default

Methods

__construct

__construct(\Jelix\Installer\ModuleStatus $moduleStatus, \Jelix\Installer\GlobalSetup $globalSetup) 

Arguments

_formatDate

_formatDate( $date) 

Arguments

$date

Backup the uninstall.php outside the module.

backupUninstallScript() : boolean

It allows to run the uninstall.php script of the module, even if the module does not exist any more. 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 informations because they are reverse dependencies of an other module we should uninstall.

Response

boolean

true if there is a uninstall.php script

checkJelixVersion

checkJelixVersion( $jelixVersion) 

Arguments

$jelixVersion

checkVersion

checkVersion( $min,  $max) 

Arguments

$min

$max

createConfigurator

createConfigurator( $installParameters = null) 

Arguments

$installParameters

instancies the object which is responsible to configure the module.

getConfigurator(integer $actionMode, boolean $forLocalConfiguration = null, null|mixed $installParameters = null) : null|\Jelix\Installer\Module\Configurator
Throws
\Jelix\Installer\Exception

when configurator class not found

Arguments

$actionMode

integer

one of CONFIGURATORTO* constants

$forLocalConfiguration

boolean

true if the configuration should be done with the local configuration, else it will be done with the main configuration

$installParameters

null|mixed

Response

null|\Jelix\Installer\Module\Configurator

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

getConfigureAction

getConfigureAction() 

getDbProfile

getDbProfile() 

getDependencies

getDependencies() 

getIncompatibilities

getIncompatibilities() 

getInstallAction

getInstallAction() 

getInstalledVersion

getInstalledVersion() 

instancies the object which is responsible to install the module.

getInstaller() : null|\jIInstallerComponent|\Jelix\Installer\Module\InstallerInterface
Throws
\Jelix\Installer\Exception

when install class not found

Response

null|\jIInstallerComponent|\Jelix\Installer\Module\InstallerInterface

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

getInstallParameters

getInstallParameters() : array<mixed,string>

Response

array<mixed,string>

getJelixVersion

getJelixVersion() 

getName

getName() 

getPath

getPath() 

getResolverItem

getResolverItem(mixed $forConfiguration = false) : \Jelix\Dependencies\Item

Arguments

$forConfiguration

mixed

Response

\Jelix\Dependencies\Item

getSourceDate

getSourceDate() 

getSourceVersion

getSourceVersion() 

instancies the object which is responsible to uninstall the module.

getUninstaller() : null|\jIInstallerComponent|\Jelix\Installer\Module\UninstallerInterface
Throws
\Jelix\Installer\Exception

when install class not found

Response

null|\jIInstallerComponent|\Jelix\Installer\Module\UninstallerInterface

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

return the list of objects which are responsible to upgrade the module from the current installed version of the module.

getUpgraders() : array<mixed,\jIInstallerComponent>|array<mixed,\Jelix\Installer\Module\InstallerInterface>

this method should be called after verifying and resolving dependencies. Needed modules should be installed/upgraded before calling this method

Throws
\Jelix\Installer\Exception

if an error occurs during the install

Response

array<mixed,\jIInstallerComponent>|array<mixed,\Jelix\Installer\Module\InstallerInterface>

hasUninstallScript

hasUninstallScript() 

initialize the object, by reading the identity file.

init() 

installFinished

installFinished() 

isEnabled

isEnabled() 

isEnabledOnlyInLocalConfiguration

isEnabledOnlyInLocalConfiguration() 

isInstalled

isInstalled() 

isUpgraded

isUpgraded() : boolean
Throws
\Jelix\Installer\Exception

Response

boolean

save module infos into the app config or the local config.

saveModuleStatus() 

setInstalledVersion

setInstalledVersion( $version) 

Arguments

$version

Set installation parameters into module infos.

setInstallParameters(array<mixed,string> $parameters) 

Arguments

$parameters

array<mixed,string>

uninstallFinished

uninstallFinished() 

upgradeFinished

upgradeFinished( $upgrader) 

Arguments

$upgrader

Constants

CONFIGURATOR_TO_CONFIGURE

CONFIGURATOR_TO_CONFIGURE

CONFIGURATOR_TO_UNCONFIGURE

CONFIGURATOR_TO_UNCONFIGURE

Properties

name of the module

name : string
var

name of the module

Type(s)

string

globalSetup

globalSetup : \Jelix\Installer\GlobalSetup

the minimum version of jelix for which the component is compatible

jelixMinVersion : string
var

the minimum version of jelix for which the component is compatible

Type(s)

string

the maximum version of jelix for which the component is compatible

jelixMaxVersion : string
var

the maximum version of jelix for which the component is compatible

Type(s)

string

code error of the installation.

inError : 

Type(s)

informations of the modules from their module.xml.

moduleInfos : \Jelix\Core\Infos\ModuleInfos

status of modules into the application.

moduleStatus : \Jelix\Installer\ModuleStatus

moduleConfigurator

moduleConfigurator : \Jelix\Installer\Module\Configurator

moduleInstaller

moduleInstaller : \jInstallerModule|\Jelix\Installer\Module\Installer

moduleUninstaller

moduleUninstaller : \jInstallerModule|\Jelix\Installer\Module\Uninstaller

moduleUpgraders

moduleUpgraders : array<mixed,\jInstallerModule>|array<mixed,\Jelix\Installer\Module\Installer>
var

Type(s)

array<mixed,\jInstallerModule>|array<mixed,\Jelix\Installer\Module\Installer>

moduleMainUpgrader

moduleMainUpgrader : \jInstallerModule|\Jelix\Installer\Module\Installer

upgradersContexts

upgradersContexts : 

Type(s)