Jelix\Core\AppInstance::getAllModulesPath PHP Method

getAllModulesPath() public method

returns all modules path, even those are not used by the application.
public getAllModulesPath ( ) : string[]
return string[] keys are module name, values are paths
    public function getAllModulesPath()
    {
        if ($this->_allModulesPath === null) {
            $this->_allModulesPath = array();
            $this->_allModulesPath['jelix'] = realpath(__DIR__ . '/../../jelix-legacy/core-modules/jelix/') . DIRECTORY_SEPARATOR;
            foreach ($this->_modulesPath as $modulePath) {
                $this->_allModulesPath[basename($modulePath)] = $modulePath . DIRECTORY_SEPARATOR;
            }
            foreach ($this->_modulesDirPath as $basePath => $names) {
                $path = $basePath . DIRECTORY_SEPARATOR;
                if (is_array($names)) {
                    foreach ($names as $name) {
                        $this->_allModulesPath[$name] = $path . $name . DIRECTORY_SEPARATOR;
                    }
                } elseif ($names == '*' || $names === null) {
                    if ($handle = opendir($path)) {
                        while (false !== ($name = readdir($handle))) {
                            if ($name[0] != '.' && is_dir($path . $name)) {
                                $this->_allModulesPath[$name] = $path . $name . DIRECTORY_SEPARATOR;
                            }
                        }
                        closedir($handle);
                    }
                }
            }
        }
        return $this->_allModulesPath;
    }