Lines Matching defs:packageName
93 * @param string $packageName
97 public static function isInstalled($packageName, $includeDevRequirements = true)
100 if (isset($installed['versions'][$packageName])) {
101 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
116 * @param string $packageName
120 public static function satisfies(VersionParser $parser, $packageName, $constraint)
123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
134 * @param string $packageName
137 public static function getVersionRanges($packageName)
140 if (!isset($installed['versions'][$packageName])) {
145 if (isset($installed['versions'][$packageName]['pretty_version'])) {
146 $ranges[] = $installed['versions'][$packageName]['pretty_version'];
148 if (array_key_exists('aliases', $installed['versions'][$packageName])) {
149 $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
151 if (array_key_exists('replaced', $installed['versions'][$packageName])) {
152 $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
154 if (array_key_exists('provided', $installed['versions'][$packageName])) {
155 $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
161 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
165 * @param string $packageName
168 public static function getVersion($packageName)
171 if (!isset($installed['versions'][$packageName])) {
175 if (!isset($installed['versions'][$packageName]['version'])) {
179 return $installed['versions'][$packageName]['version'];
182 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
186 * @param string $packageName
189 public static function getPrettyVersion($packageName)
192 if (!isset($installed['versions'][$packageName])) {
196 if (!isset($installed['versions'][$packageName]['pretty_version'])) {
200 return $installed['versions'][$packageName]['pretty_version'];
203 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
207 * @param string $packageName
210 public static function getReference($packageName)
213 if (!isset($installed['versions'][$packageName])) {
217 if (!isset($installed['versions'][$packageName]['reference'])) {
221 return $installed['versions'][$packageName]['reference'];
224 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
228 * @param string $packageName
231 public static function getInstallPath($packageName)
234 if (!isset($installed['versions'][$packageName])) {
238 return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
241 throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');