jInstallerComponentBase

a class to install a component (module or plugin)

package

jelix

subpackage

installer

since 1.2

Methods

__construct

__construct(string $name, string $path, \jInstaller $mainInstaller) 

Arguments

$name

string

the name of the component

$path

string

the path of the component

$mainInstaller

\jInstaller

addModuleInfos

addModuleInfos( $epId, \jInstallerModuleInfos $module) 

Arguments

$epId

$module

\jInstallerModuleInfos

module infos

checkJelixVersion

checkJelixVersion( $jelixVersion) 

Arguments

$jelixVersion

checkVersion

checkVersion( $min,  $max) 

Arguments

$min

$max

getAccessLevel

getAccessLevel( $epId) 

Arguments

$epId

getInstalledVersion

getInstalledVersion( $epId) 

Arguments

$epId

get the object which is responsible to install the component. this object should implement jIInstallerComponent.

getInstaller(\jInstallerEntryPoint $ep, boolean $installWholeApp) : \jIInstallerComponent
abstract

Arguments

$ep

\jInstallerEntryPoint

the entry point

$installWholeApp

boolean

true if the installation is done during app installation

Response

\jIInstallerComponent

the installer, or null if there isn't any installer or false if the installer is useless for the given parameter

getInstallParameters

getInstallParameters( $epId) 

Arguments

$epId

getJelixVersion

getJelixVersion() 

getName

getName() 

getPath

getPath() 

getSourceDate

getSourceDate() 

getSourceVersion

getSourceVersion() 

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

getUpgraders(\jInstallerEntryPoint $ep) : array
abstract

this method should be called after verifying and resolving dependencies. Needed components (modules or plugins) should be installed/upgraded before calling this method

Throws
\jInstallerException

if an error occurs during the install.

Arguments

$ep

\jInstallerEntryPoint

the entry point

Response

array

array of jIInstallerComponent

initialize the object, by reading the identity file

init() 

installFinished

installFinished( $ep) 

Arguments

$ep

isInstalled

isInstalled( $epId) 

Arguments

$epId

isUpgraded

isUpgraded( $epId) 

Arguments

$epId

readDependencies

readDependencies( $xml) 

Arguments

$xml

read the identity file

readIdentity() 
Throws
\Exception

setInstalledVersion

setInstalledVersion( $epId,  $version) 

Arguments

$epId

$version

setInstallParameters

setInstallParameters( $epId,  $parameters) 

Arguments

$epId

$parameters

upgradeFinished

upgradeFinished( $ep,  $upgrader) 

Arguments

$ep

$upgrader

Properties

name of the component

name : string
var

name of the component

Type(s)

string

the path of the directory of the component it should be set by the constructor

path : string
var

the path of the directory of the component it should be set by the constructor

Type(s)

string

version of the current sources of the module

sourceVersion : string
var

version of the current sources of the module

Type(s)

string

the date of the current sources of the module

sourceDate : string
var

the date of the current sources of the module

Type(s)

string

the namespace of the xml file

identityNamespace : string
var

the namespace of the xml file

Type(s)

string

the expected name of the root element in the xml file

rootName : string
var

the expected name of the root element in the xml file

Type(s)

string

the name of the xml file

identityFile : string
var

the name of the xml file

Type(s)

string

the main installer controller

mainInstaller : \jInstaller
var

the main installer controller

Type(s)

\jInstaller

list of dependencies of the module

dependencies : 

Type(s)

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)

list of information about the module for each entry points

moduleInfos : array<mixed,\jInstallerModuleInfos>
var

key = epid

Type(s)

array<mixed,\jInstallerModuleInfos>

indicate if the identify file has already been readed

identityReaded : boolean
var

indicate if the identify file has already been readed

Type(s)

boolean