InstalledVersions::getInstalledPackagesByType( string $type )

Returns a list of all package names with a specific type e.g. ‘library’


Parameters Parameters

$type

(string) (Required)


Top ↑

Return Return

(string[])


Top ↑

Source Source

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

    public static function getInstalledPackagesByType($type)
    {
        $packagesByType = array();

        foreach (self::getInstalled() as $installed) {
            foreach ($installed['versions'] as $name => $package) {
                if (isset($package['type']) && $package['type'] === $type) {
                    $packagesByType[] = $name;
                }
            }
        }

        return $packagesByType;
    }

Top ↑

User Contributed Notes User Contributed Notes

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