<?php











namespace Composer;

use Composer\Semver\VersionParser;






class InstalledVersions
{
private static $installed = array (
  'root' => 
  array (
    'pretty_version' => 'dev-master',
    'version' => 'dev-master',
    'aliases' => 
    array (
    ),
    'reference' => '0e226d1d0b3027e276a6a5059de1b4808692bd3d',
    'name' => 'updraftplus/updraftplus',
  ),
  'versions' => 
  array (
    'aws/aws-sdk-php' => 
    array (
      'pretty_version' => '2.8.31',
      'version' => '2.8.31.0',
      'aliases' => 
      array (
      ),
      'reference' => '64fa4b07f056e338a5f0f29eece75babaa83af68',
    ),
    'components/jquery' => 
    array (
      'pretty_version' => '3.5.1',
      'version' => '3.5.1.0',
      'aliases' => 
      array (
      ),
      'reference' => 'b33e8f0f9a1cb2ae390cf05d766a900b53d2125b',
    ),
    'components/jquery-blockui' => 
    array (
      'pretty_version' => 'v2.71',
      'version' => '2.71.0.0',
      'aliases' => 
      array (
      ),
      'reference' => 'ba184b5d243e0be7183060f72ff58fabacc234d7',
    ),
    'eher/oauth' => 
    array (
      'pretty_version' => '1.0.7',
      'version' => '1.0.7.0',
      'aliases' => 
      array (
      ),
      'reference' => '935c1f7709d1c1457de9e250d0e5f29cac06e507',
    ),
    'guzzle/batch' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/cache' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/common' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/guzzle' => 
    array (
      'pretty_version' => 'dev-master',
      'version' => 'dev-master',
      'aliases' => 
      array (
        0 => '3.9.x-dev',
      ),
      'reference' => '33e727db47ca87262814f3ced23642261452c2f0',
    ),
    'guzzle/http' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/inflection' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/iterator' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/log' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/parser' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-async' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-backoff' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-cache' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-cookie' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-curlauth' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-error-response' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-history' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-log' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-md5' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-mock' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/plugin-oauth' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/service' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'guzzle/stream' => 
    array (
      'replaced' => 
      array (
        0 => 'dev-master',
        1 => '3.9.x-dev',
      ),
    ),
    'kriswallsmith/assetic' => 
    array (
      'pretty_version' => 'v1.4.0',
      'version' => '1.4.0.0',
      'aliases' => 
      array (
      ),
      'reference' => 'e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1',
    ),
    'mikemccabe/json-patch-php' => 
    array (
      'pretty_version' => '0.1.0',
      'version' => '0.1.0.0',
      'aliases' => 
      array (
      ),
      'reference' => 'b3af30a6aec7f6467c773cd49b2d974a70f7c0d4',
    ),
    'phpseclib/phpseclib' => 
    array (
      'pretty_version' => '1.0.19',
      'version' => '1.0.19.0',
      'aliases' => 
      array (
      ),
      'reference' => '6537e74746c09cde3bb94317ae039bd89e1decf9',
    ),
    'psr/log' => 
    array (
      'pretty_version' => '1.1.3',
      'version' => '1.1.3.0',
      'aliases' => 
      array (
      ),
      'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
    ),
    'rackspace/php-opencloud' => 
    array (
      'pretty_version' => 'dev-master',
      'version' => 'dev-master',
      'aliases' => 
      array (
      ),
      'reference' => '062bf8bb3432c6e0f68e21a2f6dd5f02f2fc19d7',
    ),
    'robloach/component-installer' => 
    array (
      'pretty_version' => '0.0.12',
      'version' => '0.0.12.0',
      'aliases' => 
      array (
      ),
      'reference' => '1864f25db21fc173e02a359f646acd596c1b0460',
    ),
    'symfony/event-dispatcher' => 
    array (
      'pretty_version' => 'v2.8.52',
      'version' => '2.8.52.0',
      'aliases' => 
      array (
      ),
      'reference' => 'a77e974a5fecb4398833b0709210e3d5e334ffb0',
    ),
    'symfony/process' => 
    array (
      'pretty_version' => 'v3.4.47',
      'version' => '3.4.47.0',
      'aliases' => 
      array (
      ),
      'reference' => 'b8648cf1d5af12a44a51d07ef9bf980921f15fca',
    ),
    'team-updraft/common-libs' => 
    array (
      'pretty_version' => '3.0.0',
      'version' => '3.0.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '997b6453',
    ),
    'updraftplus/updraftplus' => 
    array (
      'pretty_version' => 'dev-master',
      'version' => 'dev-master',
      'aliases' => 
      array (
      ),
      'reference' => '0e226d1d0b3027e276a6a5059de1b4808692bd3d',
    ),
    'vakata/jstree' => 
    array (
      'pretty_version' => 'dev-3.3.12-rc.0-distributable',
      'version' => 'dev-3.3.12-rc.0-distributable',
      'aliases' => 
      array (
      ),
      'reference' => '9342b0a31b0abd126f2e201a4318328f25673249',
    ),
  ),
);







public static function getInstalledPackages()
{
return array_keys(self::$installed['versions']);
}









public static function isInstalled($packageName)
{
return isset(self::$installed['versions'][$packageName]);
}














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)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}

$ranges = array();
if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
}

return implode(' || ', $ranges);
}





public static function getVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}

if (!isset(self::$installed['versions'][$packageName]['version'])) {
return null;
}

return self::$installed['versions'][$packageName]['version'];
}





public static function getPrettyVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}

if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
return null;
}

return self::$installed['versions'][$packageName]['pretty_version'];
}





public static function getReference($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}

if (!isset(self::$installed['versions'][$packageName]['reference'])) {
return null;
}

return self::$installed['versions'][$packageName]['reference'];
}





public static function getRootPackage()
{
return self::$installed['root'];
}







public static function getRawData()
{
return self::$installed;
}



















public static function reload($data)
{
self::$installed = $data;
}
}
