Jelix\Installer\EntryPoint::__construct PHP Method

__construct() public method

public __construct ( Jelix\IniFile\MultiIniModifier $mainConfig, Jelix\IniFile\MultiIniModifier $localConfig, string $configFile, string $file, string $type )
$mainConfig Jelix\IniFile\MultiIniModifier the mainconfig.ini.php file combined with defaultconfig.ini.php
$localConfig Jelix\IniFile\MultiIniModifier the localconfig.ini.php file combined with $mainConfig
$configFile string the path of the configuration file, relative to the app/config directory
$file string the filename of the entry point
$type string type of the entry point ('classic', 'cli', 'xmlrpc'....)
    function __construct(\Jelix\IniFile\MultiIniModifier $mainConfig, \Jelix\IniFile\MultiIniModifier $localConfig, $configFile, $file, $type)
    {
        $this->type = $type;
        $this->isCliScript = $type == 'cmdline';
        $this->configFile = $configFile;
        $this->scriptName = $this->isCliScript ? $file : '/' . $file;
        $this->file = $file;
        $this->mainConfigIni = $mainConfig;
        $this->localConfigIni = $localConfig;
        $appConfigPath = \Jelix\Core\App::appConfigPath($configFile);
        if (!file_exists($appConfigPath)) {
            \jFile::createDir(dirname($appConfigPath));
            file_put_contents($appConfigPath, ';<' . '?php die(\'\');?' . '>');
        }
        $this->epConfigIni = new \Jelix\IniFile\IniModifier($appConfigPath);
        $varConfigPath = \Jelix\Core\App::configPath($configFile);
        if (!file_exists($varConfigPath)) {
            \jFile::createDir(dirname($varConfigPath));
            file_put_contents($varConfigPath, ';<' . '?php die(\'\');?' . '>');
        }
        $this->localEpConfigIni = new \Jelix\IniFile\IniModifier($varConfigPath);
        $this->fullConfigIni = new \Jelix\IniFile\MultiIniModifier($localConfig, $this->epConfigIni);
        $this->fullConfigIni = new \Jelix\IniFile\MultiIniModifier($this->fullConfigIni, $this->localEpConfigIni);
        $compiler = new \Jelix\Core\Config\Compiler($configFile, $this->scriptName, $this->isCliScript);
        $this->config = $compiler->read(true);
        $this->modulesInfos = $compiler->getModulesInfos();
    }