PHP 클래스 Jelix\Installer\AbstractInstaller

부터: 1.2
파일 보기 프로젝트 열기: jelix/jelix

공개 프로퍼티들

프로퍼티 타입 설명
$date the date of the release of the update. format: yyyy-mm-dd hh:ii
$name name of the installer
$targetVersions array Useful for an upgrade which target multiple branches of a project. Put the version for multiple branches. The installer will be called only once, for the needed version. If you don't fill it, the name of the class file should contain the target version (deprecated behavior though)
$version the version for which the installer is called

보호된 프로퍼티들

프로퍼티 타입 설명
$componentName name of the component
$config Jelix\IniFile\MultiIniModifier combination between mainconfig.ini.php (master) and entrypoint config (overrider)
$contextId
$dbProfile the jDb profile for the component
$defaultDbProfile the default profile name for the component, if it exist. keep it to '' if not
$entryPoint EntryPoint the entry point property on which the installer is called
$installWholeApp true if this is an installation for the whole application. false if this is an installation in an already installed application. Always False for upgraders.
$newContextId
$parameters array parameters for the installer, indicated in the configuration file or dynamically, by a launcher in a command line for instance.
$path string The path of the module

공개 메소드들

메소드 설명
__construct ( string $componentName, string $name, string $path, string $version, boolean $installWholeApp = false )
getConfigIni ( ) : Jelix\IniFile\MultiIniModifier the entry point config combined with $localConfigIni
getContexts ( )
getLocalConfigIni ( ) : Jelix\IniFile\MultiIniModifier the localconfig.ini.php file combined with $mainConfigIni
getMainConfigIni ( ) : Jelix\IniFile\MultiIniModifier the mainconfig.ini.php file combined with defaultconfig.ini.php
getParameter ( $name )
setEntryPoint ( EntryPoint $ep, string $dbProfile, array $contexts ) is called to indicate that the installer will be called for the given configuration, entry point and db profile.
setParameters ( $parameters )

보호된 메소드들

메소드 설명
copyDirectoryContent ( string $relativeSourcePath, string $targetPath, $overwrite = false ) copy the whole content of a directory existing in the install/ directory of the component, to the given directory
copyFile ( string $relativeSourcePath, string $targetPath, $overwrite = false ) copy a file from the install/ directory to an other
dbConnection ( ) : jDbConnection
dbTool ( ) : jDbTools
declareDbProfile ( string $name, null | string | array $sectionContent = null, boolean $force = true ) : boolean declare a new db profile. if the content of the section is not given, it will declare an alias to the default profile
declareNewEntryPoint ( $epId, $epType, $configFileName )
execSQLScript ( string $name, string $module = null, boolean $inTransaction = true ) import a sql script into the current profile.
expandPath ( $path )
firstConfExec ( $config = '' )
firstDbExec ( $profile = '' )
firstExec ( $contextId )
getDbType ( string $profile = null ) : string
useDbProfile ( string $dbProfile ) use the given database profile. check if this is an alias and use the real db profiel if this is the case.

비공개 메소드들

메소드 설명
_copyDirectoryContent ( string $sourcePath, string $targetPath, $overwrite ) private function which copy the content of a directory to an other

메소드 상세

__construct() 공개 메소드

public __construct ( string $componentName, string $name, string $path, string $version, boolean $installWholeApp = false )
$componentName string name of the component
$name string name of the installer
$path string the component path
$version string version of the component
$installWholeApp boolean true if the installation is during the whole app installation false if it is only few modules and this module

copyDirectoryContent() 최종 보호된 메소드

copy the whole content of a directory existing in the install/ directory of the component, to the given directory
final protected copyDirectoryContent ( string $relativeSourcePath, string $targetPath, $overwrite = false )
$relativeSourcePath string relative path to the install/ directory of the component
$targetPath string the full path where to copy the content

copyFile() 최종 보호된 메소드

copy a file from the install/ directory to an other
final protected copyFile ( string $relativeSourcePath, string $targetPath, $overwrite = false )
$relativeSourcePath string relative path to the install/ directory of the file to copy
$targetPath string the full path where to copy the file

dbConnection() 보호된 메소드

protected dbConnection ( ) : jDbConnection
리턴 jDbConnection the connection to the database used for the module

dbTool() 보호된 메소드

protected dbTool ( ) : jDbTools
리턴 jDbTools the tool class of jDb

declareDbProfile() 보호된 메소드

declare a new db profile. if the content of the section is not given, it will declare an alias to the default profile
protected declareDbProfile ( string $name, null | string | array $sectionContent = null, boolean $force = true ) : boolean
$name string the name of the new section/alias
$sectionContent null | string | array the content of the new section, or null to create an alias.
$force boolean true:erase the existing profile
리턴 boolean true if the ini file has been changed

declareNewEntryPoint() 보호된 메소드

protected declareNewEntryPoint ( $epId, $epType, $configFileName )

execSQLScript() 최종 보호된 메소드

The name of the script should be store in install/$name.databasetype.sql in the directory of the component. (replace databasetype by mysql, pgsql etc.) You can however provide a script compatible with all databases, but then you should indicate the full name of the script, with a .sql extension.
final protected execSQLScript ( string $name, string $module = null, boolean $inTransaction = true )
$name string the name of the script
$module string the module from which we should take the sql file. null for the current module
$inTransaction boolean indicate if queries should be executed inside a transaction

expandPath() 보호된 메소드

protected expandPath ( $path )

firstConfExec() 보호된 메소드

protected firstConfExec ( $config = '' )

firstDbExec() 보호된 메소드

protected firstDbExec ( $profile = '' )

firstExec() 보호된 메소드

protected firstExec ( $contextId )

getConfigIni() 공개 메소드

the entry point config combined with $localConfigIni
부터: 1.7
public getConfigIni ( ) : Jelix\IniFile\MultiIniModifier
리턴 Jelix\IniFile\MultiIniModifier

getContexts() 공개 메소드

public getContexts ( )

getDbType() 보호된 메소드

protected getDbType ( string $profile = null ) : string
$profile string the db profile
리턴 string the name of the type of database

getLocalConfigIni() 공개 메소드

the localconfig.ini.php file combined with $mainConfigIni
부터: 1.7
public getLocalConfigIni ( ) : Jelix\IniFile\MultiIniModifier
리턴 Jelix\IniFile\MultiIniModifier

getMainConfigIni() 공개 메소드

the mainconfig.ini.php file combined with defaultconfig.ini.php
부터: 1.7
public getMainConfigIni ( ) : Jelix\IniFile\MultiIniModifier
리턴 Jelix\IniFile\MultiIniModifier

getParameter() 공개 메소드

public getParameter ( $name )

setEntryPoint() 공개 메소드

is called to indicate that the installer will be called for the given configuration, entry point and db profile.
public setEntryPoint ( EntryPoint $ep, string $dbProfile, array $contexts )
$ep EntryPoint the entry point
$dbProfile string the name of the current jdb profile. It will be replaced by $defaultDbProfile if it exists
$contexts array list of contexts already executed

setParameters() 공개 메소드

public setParameters ( $parameters )

useDbProfile() 보호된 메소드

use the given database profile. check if this is an alias and use the real db profiel if this is the case.
protected useDbProfile ( string $dbProfile )
$dbProfile string the profile name

프로퍼티 상세

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

name of the component
protected $componentName

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

combination between mainconfig.ini.php (master) and entrypoint config (overrider)
사용 중단: use entryPoint methods to access to different configuration files.
protected MultiIniModifier,Jelix\IniFile $config
리턴 Jelix\IniFile\MultiIniModifier

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

protected $contextId

$date 공개적으로 프로퍼티

the date of the release of the update. format: yyyy-mm-dd hh:ii
부터: 1.2.6
public $date

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

the jDb profile for the component
protected $dbProfile

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

the default profile name for the component, if it exist. keep it to '' if not
protected $defaultDbProfile

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

the entry point property on which the installer is called
protected EntryPoint,Jelix\Installer $entryPoint
리턴 EntryPoint

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

true if this is an installation for the whole application. false if this is an installation in an already installed application. Always False for upgraders.
protected $installWholeApp

$name 공개적으로 프로퍼티

name of the installer
public $name

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

protected $newContextId

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

parameters for the installer, indicated in the configuration file or dynamically, by a launcher in a command line for instance.
protected array $parameters
리턴 array

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

The path of the module
protected string $path
리턴 string

$targetVersions 공개적으로 프로퍼티

Useful for an upgrade which target multiple branches of a project. Put the version for multiple branches. The installer will be called only once, for the needed version. If you don't fill it, the name of the class file should contain the target version (deprecated behavior though)
부터: 1.2.6
public array $targetVersions
리턴 array

$version 공개적으로 프로퍼티

the version for which the installer is called
public $version