ok
Direktori : /home2/selectio/public_html/mm-tailor-billing/vendor/composer/ |
Current File : /home2/selectio/public_html/mm-tailor-billing/vendor/composer/InstalledVersions.php |
<?php namespace Composer; use Composer\Autoload\ClassLoader; use Composer\Semver\VersionParser; class InstalledVersions { private static $installed = array ( 'root' => array ( 'pretty_version' => '4.1.0', 'version' => '4.1.0.0', 'aliases' => array ( ), 'reference' => NULL, 'name' => 'saleem/spos', ), 'versions' => array ( 'container-interop/container-interop' => array ( 'pretty_version' => '1.2.0', 'version' => '1.2.0.0', 'aliases' => array ( ), 'reference' => '79cbf1341c22ec75643d841642dd5d6acd83bdb8', ), 'container-interop/container-interop-implementation' => array ( 'provided' => array ( 0 => '^1.2', ), ), 'guzzlehttp/guzzle' => array ( 'pretty_version' => '7.3.0', 'version' => '7.3.0.0', 'aliases' => array ( ), 'reference' => '7008573787b430c1c1f650e3722d9bba59967628', ), 'guzzlehttp/promises' => array ( 'pretty_version' => '1.4.1', 'version' => '1.4.1.0', 'aliases' => array ( ), 'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d', ), 'guzzlehttp/psr7' => array ( 'pretty_version' => '1.8.1', 'version' => '1.8.1.0', 'aliases' => array ( ), 'reference' => '35ea11d335fd638b5882ff1725228b3d35496ab1', ), 'league/oauth2-client' => array ( 'pretty_version' => '2.6.0', 'version' => '2.6.0.0', 'aliases' => array ( ), 'reference' => 'badb01e62383430706433191b82506b6df24ad98', ), 'league/oauth2-google' => array ( 'pretty_version' => '3.0.4', 'version' => '3.0.4.0', 'aliases' => array ( ), 'reference' => '6b79441f244040760bed5fdcd092a2bda7cf34c6', ), 'mike42/escpos-php' => array ( 'pretty_version' => 'v2.2', 'version' => '2.2.0.0', 'aliases' => array ( ), 'reference' => 'e5496cf819b048b11877117bd14a9cea4fb17c03', ), 'paragonie/random_compat' => array ( 'pretty_version' => 'v9.99.100', 'version' => '9.99.100.0', 'aliases' => array ( ), 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', ), 'phpmailer/phpmailer' => array ( 'pretty_version' => 'v6.4.0', 'version' => '6.4.0.0', 'aliases' => array ( ), 'reference' => '050d430203105c27c30efd1dce7aa421ad882d01', ), 'psr/container' => array ( 'pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'aliases' => array ( ), 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf', ), 'psr/container-implementation' => array ( 'provided' => array ( 0 => '^1.0', ), ), 'psr/http-client' => array ( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'aliases' => array ( ), 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621', ), 'psr/http-client-implementation' => array ( 'provided' => array ( 0 => '1.0', ), ), 'psr/http-message' => array ( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'aliases' => array ( ), 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', ), 'psr/http-message-implementation' => array ( 'provided' => array ( 0 => '1.0', ), ), 'ralouphie/getallheaders' => array ( 'pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'aliases' => array ( ), 'reference' => '120b605dfeb996808c31b6477290a714d356e822', ), 'saleem/spos' => array ( 'pretty_version' => '4.1.0', 'version' => '4.1.0.0', 'aliases' => array ( ), 'reference' => NULL, ), 'stripe/stripe-php' => array ( 'pretty_version' => 'v6.43.1', 'version' => '6.43.1.0', 'aliases' => array ( ), 'reference' => '42fcdaf99c44bb26937223f8eae1f263491d5ab8', ), 'zendframework/zend-barcode' => array ( 'pretty_version' => '2.8.0', 'version' => '2.8.0.0', 'aliases' => array ( ), 'reference' => '6db95687997920b8217e71d2f12b51ec10e824d9', ), 'zendframework/zend-servicemanager' => array ( 'pretty_version' => '3.4.0', 'version' => '3.4.0.0', 'aliases' => array ( ), 'reference' => 'a1ed6140d0d3ee803fec96582593ed024950067b', ), 'zendframework/zend-stdlib' => array ( 'pretty_version' => '3.2.1', 'version' => '3.2.1.0', 'aliases' => array ( ), 'reference' => '66536006722aff9e62d1b331025089b7ec71c065', ), 'zendframework/zend-validator' => array ( 'pretty_version' => '2.13.0', 'version' => '2.13.0.0', 'aliases' => array ( ), 'reference' => 'b54acef1f407741c5347f2a97f899ab21f2229ef', ), ), ); private static $canGetVendors; private static $installedByVendor = array(); 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))); } public static function isInstalled($packageName) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { return true; } } return false; } public static function satisfies(VersionParser $parser, $packageName, $constraint) { $constraint = $parser->parseConstraints($constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); } public static function getVersionRanges($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } $ranges = array(); if (isset($installed['versions'][$packageName]['pretty_version'])) { $ranges[] = $installed['versions'][$packageName]['pretty_version']; } if (array_key_exists('aliases', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); } if (array_key_exists('replaced', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); } if (array_key_exists('provided', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); } return implode(' || ', $ranges); } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } public static function getVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['version'])) { return null; } return $installed['versions'][$packageName]['version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } public static function getPrettyVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['pretty_version'])) { return null; } return $installed['versions'][$packageName]['pretty_version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } public static function getReference($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['reference'])) { return null; } return $installed['versions'][$packageName]['reference']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } public static function getRootPackage() { $installed = self::getInstalled(); return $installed[0]['root']; } public static function getRawData() { return self::$installed; } public static function reload($data) { self::$installed = $data; self::$installedByVendor = array(); } private static function getInstalled() { if (null === self::$canGetVendors) { self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); } $installed = array(); if (self::$canGetVendors) { foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; } } } $installed[] = self::$installed; return $installed; } }