Lines Matching defs:packageName
206 public static function isInstalled($packageName)
209 if (isset($installed['versions'][$packageName])) {
230 public static function satisfies(VersionParser $parser, $packageName, $constraint)
233 $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
247 public static function getVersionRanges($packageName)
250 if (!isset($installed['versions'][$packageName])) {
255 if (isset($installed['versions'][$packageName]['pretty_version'])) {
256 $ranges[] = $installed['versions'][$packageName]['pretty_version'];
258 if (array_key_exists('aliases', $installed['versions'][$packageName])) {
259 $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
261 if (array_key_exists('replaced', $installed['versions'][$packageName])) {
262 $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
264 if (array_key_exists('provided', $installed['versions'][$packageName])) {
265 $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
271 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
278 public static function getVersion($packageName)
281 if (!isset($installed['versions'][$packageName])) {
285 if (!isset($installed['versions'][$packageName]['version'])) {
289 return $installed['versions'][$packageName]['version'];
292 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
299 public static function getPrettyVersion($packageName)
302 if (!isset($installed['versions'][$packageName])) {
306 if (!isset($installed['versions'][$packageName]['pretty_version'])) {
310 return $installed['versions'][$packageName]['pretty_version'];
313 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
320 public static function getReference($packageName)
323 if (!isset($installed['versions'][$packageName])) {
327 if (!isset($installed['versions'][$packageName]['reference'])) {
331 return $installed['versions'][$packageName]['reference'];
334 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');