Jelix 1.8.13

InstallHelpers extends PreInstallHelpers
in package
Uses FileHelpersTrait

Tags
since
1.7

Table of Contents

$databaseHelpers  : DatabaseHelpers
$globalSetup  : GlobalSetup
global setup.
__construct()  : mixed
copyDirectoryContent()  : mixed
copy the whole content of a directory existing in the install/ directory of the component, to the given directory.
copyFile()  : mixed
copy a file from the install/ directory to an other.
database()  : DatabaseHelpers
declareDbProfile()  : bool
declare a new db profile. if the content of the section is not given, it will declare an alias to the default profile.
declareGlobalWebAssets()  : mixed
declare web assets into the main configuration.
findDbProfile()  : array<string|int, mixed>
getConfigIni()  : IniModifierArray
default config, main config combined with local config (RW) and live config (RW).
getCoordPluginConfig()  : null|array<string|int, mixed>
return the section name of configuration of a plugin for the coordinator or the IniModifier for the configuration file of the plugin if it exists.
getEntryPointsById()  : EntryPoint
getEntryPointsByType()  : array<string|int, EntryPoint>
getEntryPointsList()  : array<string|int, EntryPoint>
List of entry points of the application.
getLiveConfigIni()  : IniModifierInterface
the liveconfig.ini.php file.
getLocalConfigIni()  : IniModifierInterface|IniReaderInterface
local config ini file alone.
getMainEntryPoint()  : EntryPoint
Main entrypoint of the application (in most of case, index.php).
getProfilesIni()  : mixed
removeDbProfile()  : mixed
remove a db profile.
removeDirectoryContent()  : mixed
remove the whole content of a directory from the application.
removeEntryPoint()  : mixed
removeFile()  : mixed
delete a file from the the application.
removeGlobalWebAssets()  : mixed
remove web assets from the main configuration.
setupModuleWebFiles()  : mixed
Install web files of a module.
updateEntryPointFile()  : mixed
expandPath()  : mixed
updateOrCreateEntryPointFile()  : mixed

Properties

Methods

copyDirectoryContent()

copy the whole content of a directory existing in the install/ directory of the component, to the given directory.

public copyDirectoryContent(string $relativeSourcePath, string $targetPath[, mixed $overwrite = false ]) : mixed
Parameters
$relativeSourcePath : string

relative path to the install/ directory of the component

$targetPath : string

the path where to copy the content. the path may content Jelix shortcuts, see FileHelpersTrait

$overwrite : mixed = false
Tags
Return values
mixed

copyFile()

copy a file from the install/ directory to an other.

public copyFile(string $relativeSourcePath, string $targetPath[, mixed $overwrite = false ]) : mixed
Parameters
$relativeSourcePath : string

relative path to the install/ directory of the file to copy

$targetPath : string

the path where to copy the file. the path may content Jelix shortcuts, see FileHelpersTrait

$overwrite : mixed = false
Tags
Return values
mixed

declareDbProfile()

declare a new db profile. if the content of the section is not given, it will declare an alias to the default profile.

public declareDbProfile(string $name[, null|array<string|int, mixed>|string $sectionContent = null ][, bool $force = true ]) : bool
Parameters
$name : string

the name of the new section/alias

$sectionContent : null|array<string|int, mixed>|string = null

the content of the new section, or null to create an alias

$force : bool = true

true:erase the existing profile

Tags
Return values
bool

true if the ini file has been changed

declareGlobalWebAssets()

declare web assets into the main configuration.

public declareGlobalWebAssets(string $name, array<string|int, mixed> $values, string $collection, bool $force) : mixed
Parameters
$name : string

the name of webassets

$values : array<string|int, mixed>

should be an array with one or more of these keys 'css' (array), 'js' (array), 'require' (string)

$collection : string

the name of the webassets collection

$force : bool
Tags
Return values
mixed

findDbProfile()

public findDbProfile( $name) : array<string|int, mixed>
Parameters
$name :
Tags
Return values
array<string|int, mixed>

the first item is the profile content as an array (which may be empty if the profile does not exist), the second item is the real profile name in case $name is an alias.

getConfigIni()

default config, main config combined with local config (RW) and live config (RW).

public getConfigIni() : IniModifierArray
Tags
Return values
IniModifierArray

getCoordPluginConfig()

return the section name of configuration of a plugin for the coordinator or the IniModifier for the configuration file of the plugin if it exists.

public getCoordPluginConfig(string $pluginName[, IniReaderInterface $config = null ]) : null|array<string|int, mixed>
Parameters
$pluginName : string
$config : IniReaderInterface = null

the configuration file from which we should extract the plugin configuration. default is the full configuration.

Tags
throws
Exception

when the configuration filename is not found

Return values
null|array<string|int, mixed>

null if plugin is unknown, else array($iniModifier, $section)

getEntryPointsByType()

public getEntryPointsByType([string $type = 'classic' ]) : array<string|int, EntryPoint>
Parameters
$type : string = 'classic'
Tags
Return values
array<string|int, EntryPoint>

getLiveConfigIni()

the liveconfig.ini.php file.

public getLiveConfigIni() : IniModifierInterface
Tags
since
1.7
Return values
IniModifierInterface

getLocalConfigIni()

local config ini file alone.

public getLocalConfigIni() : IniModifierInterface|IniReaderInterface
Tags
Return values
IniModifierInterface|IniReaderInterface

getProfilesIni()

public getProfilesIni() : mixed
Tags
Return values
mixed

removeDbProfile()

remove a db profile.

public removeDbProfile(string $name) : mixed
Parameters
$name : string

the name of the section/alias

Tags
Return values
mixed

removeDirectoryContent()

remove the whole content of a directory from the application.

public removeDirectoryContent(string $targetPath) : mixed
Parameters
$targetPath : string

the path of the directory to remove the path may content Jelix shortcuts, see FileHelpersTrait

Tags
Return values
mixed

removeEntryPoint()

public removeEntryPoint(mixed $entryPointName) : mixed
Parameters
$entryPointName : mixed
Tags
Return values
mixed

removeFile()

delete a file from the the application.

public removeFile(string $targetPath) : mixed
Parameters
$targetPath : string

the path of the file the path may content Jelix shortcuts, see FileHelpersTrait

Tags
Return values
mixed

removeGlobalWebAssets()

remove web assets from the main configuration.

public removeGlobalWebAssets(string $name, string $collection) : mixed
Parameters
$name : string

the name of webassets

$collection : string

the name of the webassets collection

Tags
Return values
mixed

setupModuleWebFiles()

Install web files of a module.

public setupModuleWebFiles(string $wwwFilesMode, string $wwwDirectoryName, string $sourcePath) : mixed

It supports different way to install : copying files, creating a symbolic link or do nothing (aka you should create an alias nto the vhost of the web server)

Parameters
$wwwFilesMode : string

should be 'copy' or '' (files will be copied), 'symlink' (a sym link is created) or any other value (do nothing/remove copied files)

$wwwDirectoryName : string

the path inside the www path

$sourcePath : string

the path of the directory

Tags
throws
jException
Return values
mixed

updateEntryPointFile()

public updateEntryPointFile(mixed $entryPointModelFile, mixed $entryPointWebPath[, mixed $epType = 'classic' ]) : mixed
Parameters
$entryPointModelFile : mixed
$entryPointWebPath : mixed
$epType : mixed = 'classic'
Tags
Return values
mixed

expandPath()

protected expandPath(mixed $path) : mixed
Parameters
$path : mixed
Tags
Return values
mixed

updateOrCreateEntryPointFile()

protected updateOrCreateEntryPointFile(mixed $entryPointFile, mixed $epPath) : mixed
Parameters
$entryPointFile : mixed
$epPath : mixed
Tags
Return values
mixed

Search results