main class for the installation
It load all entry points configurations. Each configurations has its own activated modules. jInstaller then construct a tree dependencies for these activated modules, and launch their installation and the installation of their dependencies. An installation can be an initial installation, or just an upgrade if the module is already installed.
| internal |
The object which drives the installation of a component (module, plugin...) is an object which inherits from jInstallerComponentBase. This object calls load a file from the directory of the component. this file should contain a class which should inherits from jInstallerModule or jInstallerPlugin. this class should implements processes to install the component. |
|---|---|
| package |
jelix |
__construct(\jIInstallReporter $reporter, string $lang = '')
it reads configurations files of all entry points, and prepare object for each module, needed to install/upgrade modules.
\jIInstallReporterobject which is responsible to process messages (display, storage or other..)
stringthe language code for messages
_checkDependencies(\jInstallerComponentBase $component, string $epId)
_installModules(array &$modules, string $epId, boolean $installWholeApp, integer $flags = 3) : boolean
arraylist of jInstallerComponentModule
stringthe entrypoint id
booleantrue if the installation is done during app installation
integerto know what to do
booleantrue if the installation is ok
checkDependencies(array $list, $epId) : boolean
| Throws |
|
|---|
arraylist of jInstallerComponentModule/jInstallerComponentPlugin objects
booleantrue if the dependencies are ok
endMessage()
error( $msg, $params = null, $fullString = false)
forceModuleVersion(string $moduleName, string $version)
internal use !!
stringthe name of the module
stringthe new version
getEntryPoint(string $epId) : \jInstallerEntryPoint
stringan entry point id
\jInstallerEntryPointthe corresponding entry point object
installApplication(integer $flags = false) : boolean
integerflags indicating if we should install, and/or upgrade modules or only modify config files. internal use. see FLAG_* constants
booleantrue if succeed, false if there are some errors
installEntryPoint(string $entrypoint) : boolean
| Throws |
|
|---|
stringthe entrypoint name as it appears in project.xml
booleantrue if succeed, false if there are some errors
installEntryPointModules(string $epId, $flags = 3) : boolean
stringthe entrypoint id
booleantrue if succeed, false if there are some errors
installModules(array $modulesList, string $entrypoint = null) : boolean
| Throws |
|
|---|
arrayarray of module names
stringthe entrypoint name as it appears in project.xml or null if modules should be installed for all entry points
booleantrue if the installation is ok
notice( $msg, $params = null, $fullString = false)
ok( $msg, $params = null, $fullString = false)
readEntryPointData(\SimpleXmlElement $xml)
\SimpleXmlElement
setModuleParameters(string $moduleName, array $parameters, string $entrypoint = null)
stringthe name of the module
arrayparameters
stringthe entry point for which parameters will be applied when installing the module. if null, parameters are valid for all entry points
startMessage()
warning( $msg, $params = null, $fullString = false)
STATUS_UNINSTALLED
STATUS_INSTALLED
ACCESS_FORBIDDEN
a module which have this level won't be installed
ACCESS_PRIVATE
a module which have this level won't be accessible directly from the web, but only from other modules
ACCESS_PUBLIC
the module is accessible from the web
INSTALL_ERROR_MISSING_DEPENDENCIES
INSTALL_ERROR_CIRCULAR_DEPENDENCY
FLAG_INSTALL_MODULE
FLAG_UPGRADE_MODULE
FLAG_ALL
FLAG_MIGRATION_11X
installerIni : \jIniFileModifier
entryPoints : array
| var |
of jInstallerEntryPoint. keys are entry point id. |
|---|
array
epId : array
identifiant of the entry point is the path+filename of the entry point without the php extension
| var |
key=entry point name, value=url id |
|---|
array
modules : array<mixed,\jInstallerComponentModule[]>
| var |
first key: entry point id, second key: module name, value = jInstallerComponentModule |
|---|
array<mixed,\jInstallerComponentModule[]>
allModules : array
| var |
key=path of the module, value = jInstallerComponentModule |
|---|
array
reporter : \jIInstallReporter
nbError : integer
| var |
the number of errors appeared during the installation |
|---|
integer
nbOk : integer
| var |
the number of ok messages appeared during the installation |
|---|
integer
nbWarning : integer
| var |
the number of warnings appeared during the installation |
|---|
integer
nbNotice : integer
| var |
the number of notices appeared during the installation |
|---|
integer
localConfig : \jIniMultiFilesModifier
_componentsToInstall :
_checkedComponents :
_checkedCircularDependency :