Jelix\Core\Config\Compiler::_loadModulesInfo PHP Method

_loadModulesInfo() protected method

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
return Jelix\Core\Infos\ModuleInfos[]
    protected function _loadModulesInfo($config, $allModuleInfo)
    {
        $installerFile = App::configPath('installer.ini.php');
        if ($config->disableInstallers) {
            $installation = array();
        } else {
            if (file_exists($installerFile)) {
                $installation = parse_ini_file($installerFile, true);
            } else {
                if ($allModuleInfo) {
                    $installation = array();
                } else {
                    throw new Exception("The application is not installed -- installer.ini.php doesn't exist!\n", 9);
                }
            }
        }
        $section = $config->urlengine['urlScriptId'];
        if (!isset($installation[$section])) {
            $installation[$section] = array();
        }
        if ($config->compilation['checkCacheFiletime']) {
            $config->_allBasePath = App::getDeclaredModulesDir();
        } else {
            $config->_allBasePath = array();
        }
        $modules = array();
        $list = App::getAllModulesPath();
        foreach ($list as $k => $path) {
            $module = $this->_readModuleInfo($config, $allModuleInfo, $path, $installation, $section);
            if ($module !== null) {
                $modules[$module->name] = $module;
            }
        }
        return $modules;
    }