PHP Класс Jelix\Core\Config\Compiler

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$commonConfig
$config StdClass
$configFileName
$isCli
$modulesInfos Jelix\Core\Infos\ModuleInfos[]
$pseudoScriptName

Открытые методы

Метод Описание
__construct ( string $configFile = '', string $pseudoScriptName = '', boolean $isCli = null )
findServerName ( $ext = '.php', $isCli = false )
getModulesInfos ( )
read ( boolean $allModuleInfo = false, array $additionalOptions = null ) : StdClass read the ini file given to the constructor. It Merges 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

Защищенные методы

Метод Описание
_loadModulesInfo ( object $config, boolean $allModuleInfo ) : Jelix\Core\Infos\ModuleInfos[] Find all activated modules and check their status
_loadPluginsPathList ( object $config ) Analyse plugin paths
_readModuleInfo ( $config, $allModuleInfo, $path, &$installation, $section ) : Jelix\Core\Infos\ModuleInfos
checkCoordPluginsPath ( $config )
checkMiscParameters ( $config )
getPaths ( array &$urlconf, $pseudoScriptName = '', $isCli = false ) calculate miscelaneous path, depending of the server configuration and other informations in the given array : script path, script name, documentRoot .
prepareConfig ( boolean $allModuleInfo ) fill some config properties with calculated values
readConfigFiles ( $configFile, $additionalOptions )
runConfigCompilerPlugins ( StdClass $config, Jelix\Core\Infos\ModuleInfos[] $modules )

Описание методов

__construct() публичный Метод

public __construct ( string $configFile = '', string $pseudoScriptName = '', boolean $isCli = null )
$configFile string the name and path of the config file related to config dir of the app
$pseudoScriptName string the name of the entry point, relative to the base path, corresponding to the readed configuration. It should start with a leading / for non cli script.
$isCli boolean indicate if the configuration to read is for a CLI script or no

_loadModulesInfo() защищенный Метод

Find all activated modules and check their status
protected _loadModulesInfo ( object $config, boolean $allModuleInfo ) : Jelix\Core\Infos\ModuleInfos[]
$config object the config object
$allModuleInfo boolean may be true for the installer, which needs all informations else should be false, these extra informations are not needed to run the application
Результат Jelix\Core\Infos\ModuleInfos[]

_loadPluginsPathList() защищенный Метод

Analyse plugin paths
protected _loadPluginsPathList ( object $config )
$config object the config container

_readModuleInfo() защищенный Метод

protected _readModuleInfo ( $config, $allModuleInfo, $path, &$installation, $section ) : Jelix\Core\Infos\ModuleInfos
Результат Jelix\Core\Infos\ModuleInfos

checkCoordPluginsPath() защищенный Метод

protected checkCoordPluginsPath ( $config )

checkMiscParameters() защищенный Метод

protected checkMiscParameters ( $config )

findServerName() публичный статический Метод

public static findServerName ( $ext = '.php', $isCli = false )

getModulesInfos() публичный Метод

public getModulesInfos ( )

getPaths() защищенный Метод

.
protected getPaths ( array &$urlconf, $pseudoScriptName = '', $isCli = false )
$urlconf array urlengine configuration. scriptNameServerVariable, basePath, jelixWWWPath and jqueryPath should be present

prepareConfig() защищенный Метод

fill some config properties with calculated values
protected prepareConfig ( boolean $allModuleInfo )
$allModuleInfo boolean may be true for the installer, which needs all informations else should be false, these extra informations are not needed to run the application

read() публичный Метод

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
public read ( boolean $allModuleInfo = false, array $additionalOptions = null ) : StdClass
$allModuleInfo boolean may be true for the installer, which needs all informations else should be false, these extra informations are not needed to run the application
$additionalOptions array some options to add to the configuration
Результат StdClass an object which contains configuration values

readAndCache() публичный Метод

Identical to read(), but also stores the result in a temporary file
public readAndCache ( ) : object
Результат object an object which contains configuration values

readConfigFiles() защищенный Метод

protected readConfigFiles ( $configFile, $additionalOptions )

runConfigCompilerPlugins() защищенный Метод

protected runConfigCompilerPlugins ( StdClass $config, Jelix\Core\Infos\ModuleInfos[] $modules )
$config StdClass
$modules Jelix\Core\Infos\ModuleInfos[]

Описание свойств

$commonConfig защищенное свойство

protected $commonConfig

$config защищенное свойство

protected StdClass $config
Результат StdClass

$configFileName защищенное свойство

protected $configFileName

$isCli защищенное свойство

protected $isCli

$modulesInfos защищенное свойство

protected ModuleInfos[],Jelix\Core\Infos $modulesInfos
Результат Jelix\Core\Infos\ModuleInfos[]

$pseudoScriptName защищенное свойство

protected $pseudoScriptName