PHP 클래스 Jelix\Installer\Installer

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.
파일 보기 프로젝트 열기: jelix/jelix 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$installerIni it represents the installer.ini.php file.
$messages JInstallerMessageProvider
$reporter jIInstallReporter the object responsible of the results output

보호된 프로퍼티들

프로퍼티 타입 설명
$allModules list of all modules of the application
$entryPoints list of entry point and their properties
$epId identifiant of the entry point is the path+filename of the entry point without the php extension
$localConfig Jelix\IniFile\MultiIniModifier the localconfig.ini.php content combined with $mainConfig
$mainConfig Jelix\IniFile\MultiIniModifier the mainconfig.ini.php combined with the defaultconfig.ini.php
$xmlMapFile Jelix\Routing\UrlMapping\XmlMapModifier

공개 메소드들

메소드 설명
__construct ( ReporterInterface $reporter, string $lang = '' ) initialize the installation
forceModuleVersion ( string $moduleName, string $version ) change the module version in readed informations, to simulate an update when we call installApplication or an other method.
getEntryPoint ( string $epId ) : EntryPoint
installApplication ( integer $flags = false ) : boolean install and upgrade if needed, all modules for each entry point. Only modules which have an access property > 0 are installed. Errors appeared during the installation are passed to the reporter.
installEntryPoint ( string $entrypoint ) : boolean install and upgrade if needed, all modules for the given entry point. Only modules which have an access property > 0 are installed. Errors appeared during the installation are passed to the reporter.
installModules ( array $modulesList, string $entrypoint = null ) : boolean install given modules even if they don't have an access property > 0
setModuleParameters ( string $moduleName, array $parameters, string $entrypoint = null ) set parameters for the installer of a module
uninstallModules ( array $modulesList, string $entrypoint = null ) : boolean uninstall given modules

보호된 메소드들

메소드 설명
_installModules ( Resolver $resolver, EntryPoint $ep, boolean $installWholeApp, integer $flags = 7 ) : boolean core of the installation
_singleModules ( $action, $modulesList, $entrypoint )
completeInstallStatus ( )
endMessage ( )
error ( $msg, $params = null, $fullString = false )
getEntryPointObject ( $configFile, $file, $type ) : EntryPoint
getInstallerIni ( ) : Jelix\IniFile\IniModifier
notice ( $msg, $params = null, $fullString = false )
ok ( $msg, $params = null, $fullString = false )
readEntryPointsData ( Jelix\Core\Infos\AppInfos $appInfos ) read the list of entrypoint from the project.xml file and read all modules data used by each entry point
resolveDependencies ( Resolver $resolver, $epId )
runInstall ( $componentsToInstall, $ep, $epId, $flags )
runPostInstall ( $installedModules, $ep, $flags )
runPreInstall ( $moduleschain, $ep, $installWholeApp, $flags )
startMessage ( )
warning ( $msg, $params = null, $fullString = false )

메소드 상세

__construct() 공개 메소드

it reads configurations files of all entry points, and prepare object for each module, needed to install/upgrade modules.
public __construct ( ReporterInterface $reporter, string $lang = '' )
$reporter ReporterInterface object which is responsible to process messages (display, storage or other..)
$lang string the language code for messages

_installModules() 보호된 메소드

core of the installation
protected _installModules ( Resolver $resolver, EntryPoint $ep, boolean $installWholeApp, integer $flags = 7 ) : boolean
$resolver Jelix\Dependencies\Resolver
$ep EntryPoint the entrypoint
$installWholeApp boolean true if the installation is done during app installation
$flags integer to know what to do
리턴 boolean true if the installation is ok

_singleModules() 보호된 메소드

protected _singleModules ( $action, $modulesList, $entrypoint )

completeInstallStatus() 보호된 메소드

protected completeInstallStatus ( )

endMessage() 보호된 메소드

protected endMessage ( )

error() 보호된 메소드

protected error ( $msg, $params = null, $fullString = false )

forceModuleVersion() 공개 메소드

internal use !!
public forceModuleVersion ( string $moduleName, string $version )
$moduleName string the name of the module
$version string the new version

getEntryPoint() 공개 메소드

public getEntryPoint ( string $epId ) : EntryPoint
$epId string an entry point id
리턴 EntryPoint the corresponding entry point object

getEntryPointObject() 보호된 메소드

protected getEntryPointObject ( $configFile, $file, $type ) : EntryPoint
리턴 EntryPoint

getInstallerIni() 보호된 메소드

protected getInstallerIni ( ) : Jelix\IniFile\IniModifier
리턴 Jelix\IniFile\IniModifier the modifier for the installer.ini.php file

installApplication() 공개 메소드

install and upgrade if needed, all modules for each entry point. Only modules which have an access property > 0 are installed. Errors appeared during the installation are passed to the reporter.
public installApplication ( integer $flags = false ) : boolean
$flags integer flags indicating if we should install, and/or upgrade modules or only modify config files. internal use. see FLAG_* constants
리턴 boolean true if succeed, false if there are some errors

installEntryPoint() 공개 메소드

install and upgrade if needed, all modules for the given entry point. Only modules which have an access property > 0 are installed. Errors appeared during the installation are passed to the reporter.
public installEntryPoint ( string $entrypoint ) : boolean
$entrypoint string the entrypoint name as it appears in project.xml
리턴 boolean true if succeed, false if there are some errors

installModules() 공개 메소드

install given modules even if they don't have an access property > 0
public installModules ( array $modulesList, string $entrypoint = null ) : boolean
$modulesList array array of module names
$entrypoint string the entrypoint name as it appears in project.xml or null if modules should be installed for all entry points
리턴 boolean true if the installation is ok

notice() 보호된 메소드

protected notice ( $msg, $params = null, $fullString = false )

ok() 보호된 메소드

protected ok ( $msg, $params = null, $fullString = false )

readEntryPointsData() 보호된 메소드

read the list of entrypoint from the project.xml file and read all modules data used by each entry point
protected readEntryPointsData ( Jelix\Core\Infos\AppInfos $appInfos )
$appInfos Jelix\Core\Infos\AppInfos

resolveDependencies() 보호된 메소드

protected resolveDependencies ( Resolver $resolver, $epId )
$resolver Jelix\Dependencies\Resolver

runInstall() 보호된 메소드

protected runInstall ( $componentsToInstall, $ep, $epId, $flags )

runPostInstall() 보호된 메소드

protected runPostInstall ( $installedModules, $ep, $flags )

runPreInstall() 보호된 메소드

protected runPreInstall ( $moduleschain, $ep, $installWholeApp, $flags )

setModuleParameters() 공개 메소드

set parameters for the installer of a module
public setModuleParameters ( string $moduleName, array $parameters, string $entrypoint = null )
$moduleName string the name of the module
$parameters array parameters
$entrypoint string the entry point name for which parameters will be applied when installing the module. if null, parameters are valid for all entry points

startMessage() 보호된 메소드

protected startMessage ( )

uninstallModules() 공개 메소드

uninstall given modules
public uninstallModules ( array $modulesList, string $entrypoint = null ) : boolean
$modulesList array array of module names
$entrypoint string the entrypoint name as it appears in project.xml or null if modules should be uninstalled for all entry points
리턴 boolean true if the uninstallation is ok

warning() 보호된 메소드

protected warning ( $msg, $params = null, $fullString = false )

프로퍼티 상세

$allModules 보호되어 있는 프로퍼티

list of all modules of the application
protected $allModules

$entryPoints 보호되어 있는 프로퍼티

list of entry point and their properties
protected $entryPoints

$epId 보호되어 있는 프로퍼티

identifiant of the entry point is the path+filename of the entry point without the php extension
protected $epId

$installerIni 공개적으로 프로퍼티

it represents the installer.ini.php file.
public $installerIni

$localConfig 보호되어 있는 프로퍼티

the localconfig.ini.php content combined with $mainConfig
protected MultiIniModifier,Jelix\IniFile $localConfig
리턴 Jelix\IniFile\MultiIniModifier

$mainConfig 보호되어 있는 프로퍼티

the mainconfig.ini.php combined with the defaultconfig.ini.php
protected MultiIniModifier,Jelix\IniFile $mainConfig
리턴 Jelix\IniFile\MultiIniModifier

$messages 공개적으로 프로퍼티

public JInstallerMessageProvider $messages
리턴 JInstallerMessageProvider

$reporter 공개적으로 프로퍼티

the object responsible of the results output
public jIInstallReporter $reporter
리턴 jIInstallReporter

$xmlMapFile 보호되어 있는 프로퍼티

protected XmlMapModifier,Jelix\Routing\UrlMapping $xmlMapFile
리턴 Jelix\Routing\UrlMapping\XmlMapModifier