InstalledVersions::getInstallPath( string $packageName )


Parameters Parameters

$packageName

(string) (Required)


Top ↑

Return Return

(string|null) If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.


Top ↑

Source Source

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

229
230
231
232
233
234
235
236
237
238
239
240
public static function getInstallPath($packageName)
{
    foreach (self::getInstalled() as $installed) {
        if (!isset($installed['versions'][$packageName])) {
            continue;
        }
 
        return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
    }
 
    throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}

Top ↑

User Contributed Notes User Contributed Notes

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