LocalConfigurationHelpers

Extends \Jelix\Installer\Module\API\ConfigurationHelpers

since 1.7
package

Default

Methods

__construct

__construct(\Jelix\Installer\GlobalSetup $setup) 
inherited

Arguments

cli

cli() : \Jelix\Installer\Module\InteractiveConfigurator
inherited

Path to the configuration directory.

configFilePath(string $file = '') : string
inherited

It gives the path to app/system or local/config, depending if the configuration is for the application or for the instance

Arguments

$file

string

Response

string

the path

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

copyDirectoryContent(string $relativeSourcePath, string $targetPath, mixed $overwrite = false) 
inherited

Arguments

$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

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

copyFile(string $relativeSourcePath, string $targetPath, mixed $overwrite = false) 
inherited

Arguments

$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

Create a new entry point.

createEntryPoint(string $entryPointModelFile, string $entryPointWebPath, string $configFileName, string $epType = 'classic', string $configFileModel = '') 
inherited
Throws
\Exception

Arguments

$entryPointModelFile

string

the entrypoint file to copy

$entryPointWebPath

string

the path of the entrypoint to create into the www directory

$configFileName

string

name of the configuration file. path relative to app/system or var/config

$epType

string

type of the entry point (classic)

$configFileModel

string

a configuration file to copy as $configFileName. default is an empty content.

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

declareDbProfile(string $name, null|array|string $sectionContent = null, boolean $force = true) : boolean
inherited

Arguments

$name

string

the name of the new section/alias

$sectionContent

null|array|string

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

$force

boolean

true:erase the existing profile

Response

boolean

true if the ini file has been changed

declare web assets into the main configuration.

declareGlobalWebAssets(string $name, array $values, string $collection, boolean $force) 
inherited

Arguments

$name

string

the name of webassets

$values

array

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

boolean

expandPath

expandPath( $path) 
inherited

Arguments

$path

forLocalConfiguration

forLocalConfiguration() 
inherited

default config, main config combined with or without local config.

getConfigIni() : \Jelix\IniFile\IniModifierArray
inherited

Response

\Jelix\IniFile\IniModifierArray

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.

getCoordPluginConfig(string $pluginName, \Jelix\IniFile\IniReaderInterface $config = null) : null|array
inherited
Throws
\Exception

when the configuration filename is not found

Arguments

$pluginName

string

$config

\Jelix\IniFile\IniReaderInterface

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

Response

null|array

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

getEntryPointsById

getEntryPointsById( $epId) : \Jelix\Installer\EntryPointPreConfigurator
inherited

getEntryPointsByType

getEntryPointsByType(string $type = 'classic') : array<mixed,\Jelix\Installer\EntryPointPreConfigurator>
inherited

Arguments

$type

string

Response

array<mixed,\Jelix\Installer\EntryPointPreConfigurator>

List of entry points of the application.

getEntryPointsList() : array<mixed,\Jelix\Installer\EntryPointPreConfigurator>
inherited

Main entrypoint of the application (in most of case, index.php).

getMainEntryPoint() : \Jelix\Installer\EntryPointPreConfigurator
inherited

getProfilesIni

getProfilesIni() 
inherited

main config or local config ini file alone.

getSingleConfigIni() : \Jelix\IniFile\IniModifierInterface|\Jelix\IniFile\IniReaderInterface
inherited

Response

\Jelix\IniFile\IniModifierInterface|\Jelix\IniFile\IniReaderInterface

remove a db profile.

removeDbProfile(string $name) 
inherited

Arguments

$name

string

the name of the section/alias

remove the whole content of a directory from the application.

removeDirectoryContent(string $targetPath) 
inherited

Arguments

$targetPath

string

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

delete a file from the the application.

removeFile(string $targetPath) 
inherited

Arguments

$targetPath

string

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

remove web assets from the main configuration.

removeGlobalWebAssets(string $name, string $collection) 
inherited

Arguments

$name

string

the name of webassets

$collection

string

the name of the webassets collection

Install web files of a module.

setupModuleWebFiles(string $wwwFilesMode, string $wwwDirectoryName, string $sourcePath) 
inherited

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)

Throws
\jException

Arguments

$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

Properties

interactiveConfigurator

interactiveConfigurator : \Jelix\Installer\Module\InteractiveConfigurator
inherited

global setup.

globalSetup : \Jelix\Installer\GlobalSetup
inherited