public static function listInstalledModules($pathApp = "") { if (self::$useCache && self::$listModulesInstalled !== NULL) { return self::$listModulesInstalled; } $list = array(); if (file_exists($pathApp . '/config/modules/')) { $iterator = new RecursiveDirectoryIterator($pathApp . '/config/modules/'); $index = new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::SELF_FIRST); foreach ($index as $entry) { if (!$entry->isFile() || !preg_match("/\\.xml\$/", $entry->getFilename())) { continue; } $key = pathinfo($entry->getFilename(), PATHINFO_FILENAME); $module = self::readInstalledModule($pathApp, $key); $list[$key] = $module; } } ksort($list); self::$listModulesInstalled = $list; return $list; }