Jelix 1.6.40

jConfigCompiler
in package

jConfigCompiler merge two ini file in a single array and store it in a temporary file This is a static class

Tags
subpackage

core

static

Table of Contents

$commonConfig  : mixed
findServerName()  : mixed
getCacheFilename()  : string
return the path of file where to store the cache of the configuration
getModulesPaths()  : mixed
getPaths()  : mixed
calculate miscellaneous path, depending of the server configuration and other information in the given array : script path, script name, documentRoot .
read()  : object
read the given ini file, for the current entry point, or for the entrypoint given in $pseudoScriptName. Merge it with the content of mainconfig.ini.php It also calculates some options.
readAndCache()  : object
Identical to read(), but also stores the result in a temporary file
_loadModuleInfo()  : mixed
Analyse and check the "lib:" and "app:" path.
_loadPluginsPathList()  : mixed
Analyse plugin paths
checkCoordPluginsPath()  : mixed
checkMiscParameters()  : mixed
prepareConfig()  : mixed
fill some config properties with calculated values
runConfigCompilerPlugins()  : mixed
__construct()  : mixed

Properties

Methods

findServerName()

public static findServerName([mixed $ext = '.php' ][, mixed $isCli = false ]) : mixed
Parameters
$ext : mixed = '.php'
$isCli : mixed = false
Return values
mixed

getCacheFilename()

return the path of file where to store the cache of the configuration

public static getCacheFilename(string $configFile) : string
Parameters
$configFile : string

the name of the configuration file of the entry point into var/config/

Tags
since
1.6.26
Return values
string

the full path of the cache

getModulesPaths()

public static getModulesPaths(mixed $config[, mixed $toCompileConfig = false ]) : mixed
Parameters
$config : mixed
$toCompileConfig : mixed = false
Return values
mixed

getPaths()

calculate miscellaneous path, depending of the server configuration and other information in the given array : script path, script name, documentRoot .

public static getPaths(array<string|int, mixed> &$urlconf[, string $pseudoScriptName = '' ][, bool $isCli = false ]) : mixed

.

Parameters
$urlconf : array<string|int, mixed>

urlengine configuration. scriptNameServerVariable, basePath, jelixWWWPath and jqueryPath should be present

$pseudoScriptName : string = ''
$isCli : bool = false
Tags
throws
Exception
Return values
mixed

read()

read the given ini file, for the current entry point, or for the entrypoint given in $pseudoScriptName. Merge it with the content of mainconfig.ini.php It also calculates some options.

public static read(string $configFile[, bool $allModuleInfo = false ][, bool $isCli = false ][, string $pseudoScriptName = '' ]) : object

If you are in a CLI script but you want to load a configuration file for a web entry point or vice-versa, you need to indicate the $pseudoScriptName parameter with the name of the entry point

Parameters
$configFile : string

the config file name

$allModuleInfo : bool = false

may be true for the installer, which needs all informations else should be false, these extra informations are not needed to run the application

$isCli : bool = false

indicate if the configuration to read is for a CLI script or no

$pseudoScriptName : string = ''

the name of the entry point, relative to the base path, corresponding to the readed configuration

Tags
throws
Exception
Return values
object

an object which contains configuration values

readAndCache()

Identical to read(), but also stores the result in a temporary file

public static readAndCache(string $configFile[, bool $isCli = null ][, string $pseudoScriptName = '' ]) : object
Parameters
$configFile : string

the config file name

$isCli : bool = null
$pseudoScriptName : string = ''
Tags
throws
Exception
Return values
object

an object which contains configuration values

_loadModuleInfo()

Analyse and check the "lib:" and "app:" path.

protected static _loadModuleInfo(object $config, bool $allModuleInfo) : mixed
Parameters
$config : object

the config object

$allModuleInfo : bool

may be true for the installer, which needs all informations else should be false, these extra informations are not needed to run the application

Tags
throws
Exception
Return values
mixed

_loadPluginsPathList()

Analyse plugin paths

protected static _loadPluginsPathList(object $config) : mixed
Parameters
$config : object

the config container

Return values
mixed

checkCoordPluginsPath()

protected static checkCoordPluginsPath(mixed $config) : mixed
Parameters
$config : mixed
Return values
mixed

checkMiscParameters()

protected static checkMiscParameters(mixed $config) : mixed
Parameters
$config : mixed
Return values
mixed

prepareConfig()

fill some config properties with calculated values

protected static prepareConfig(object $config, bool $allModuleInfo, bool $isCli, string $pseudoScriptName) : mixed
Parameters
$config : object

the config object

$allModuleInfo : bool

may be true for the installer, which needs all informations else should be false, these extra informations are not needed to run the application

$isCli : bool

indicate if the configuration to read is for a CLI script or no

$pseudoScriptName : string

the name of the entry point, relative to the base path, corresponding to the readed configuration

Return values
mixed

runConfigCompilerPlugins()

protected static runConfigCompilerPlugins(mixed $config) : mixed
Parameters
$config : mixed
Return values
mixed

Search results