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;
}