Composer
InstalledVersions::getInstalledPackages()
Returns a list of all package names which are present, either by being installed, replaced or provided
Метод класса: InstalledVersions{}
Хуков нет.
Возвращает
Строку[]
.
Использование
$result = InstalledVersions::getInstalledPackages();
Код InstalledVersions::getInstalledPackages() InstalledVersions::getInstalledPackages WPSCache 1.12.4
public static function getInstalledPackages() { $packages = array(); foreach (self::getInstalled() as $installed) { $packages[] = array_keys($installed['versions']); } if (1 === \count($packages)) { return $packages[0]; } return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); }