Property | Type | Description | |
---|---|---|---|
$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 |
Property | Type | Description | |
---|---|---|---|
$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 | 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 |
Method | Description | |
---|---|---|
__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 ( |
is called to indicate that the installer will be called for the given configuration, entry point and db profile. | |
setParameters ( $parameters ) |
Method | Description | |
---|---|---|
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. |
Method | Description | |
---|---|---|
_copyDirectoryContent ( string $sourcePath, string $targetPath, $overwrite ) | private function which copy the content of a directory to an other |
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 |
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 |
protected dbConnection ( ) : jDbConnection | ||
return | jDbConnection | the connection to the database used for the module |
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 |
return | boolean | true if the ini file has been changed |
protected declareNewEntryPoint ( $epId, $epType, $configFileName ) |
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 |
public getConfigIni ( ) : Jelix\IniFile\MultiIniModifier | ||
return | Jelix\IniFile\MultiIniModifier |
public getLocalConfigIni ( ) : Jelix\IniFile\MultiIniModifier | ||
return | Jelix\IniFile\MultiIniModifier |
public getMainConfigIni ( ) : Jelix\IniFile\MultiIniModifier | ||
return | Jelix\IniFile\MultiIniModifier |
public setEntryPoint ( |
||
$ep | 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 |
protected useDbProfile ( string $dbProfile ) | ||
$dbProfile | string | the profile name |
protected MultiIniModifier,Jelix\IniFile $config | ||
return | Jelix\IniFile\MultiIniModifier |
protected $defaultDbProfile |
protected EntryPoint,Jelix\Installer $entryPoint | ||
return |
protected $installWholeApp |
protected array $parameters | ||
return | array |
public array $targetVersions | ||
return | array |