InstalledVersions::getInstalledPackages()

Returns a list of all package names which are present, either by being installed, replaced or provided


Return Return

(string[])


Top ↑

Source Source

File: libraries/lifterlms-cli/vendor/composer/InstalledVersions.php

50
51
52
53
54
55
56
57
58
59
60
61
62
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)));
}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.