Get value from the revision.

@param string $version
@param string $key

@return mixed
519504
public function getFromRevision($version, $key)
    {
        return ($this->isPassedThrough($key))
            ? $this->passThrough($version, $key)
            : array_get($this->{$version}, $key);
    }
1186420
static function fetch( $roleID, $version = 0 )
    {
        if ( $version != 0 )
        {
            return eZPersistentObject::fetchObject( eZRole::definition(),
                                                    null, array( 'version' => $version ), true );
        }
        return eZPersistentObject::fetchObject( eZRole::definition(),
                                                null, array('id' => $roleID ), true );
    }
66402
public function fetch($version = '')
    {
        $response = $this->getRepositoryReleases();
        $releaseCollection = collect(\GuzzleHttp\json_decode($response->getBody()));

        if ($releaseCollection->isEmpty()) {
            throw new \Exception('Cannot find a release to update. Please check the repository you\'re pulling from');
        }

        $release = $releaseCollection->first();

        $storagePath = $this->config['download_path'];

        if (! File::exists($storagePath)) {
            File::makeDirectory($storagePath, 493, true, true);
        }

        if (! empty($version)) {
            $release = $releaseCollection->where('name', $version)->first();
        }

        $storageFilename = "{$release->name}.zip";

        if (! $this->isSourceAlreadyFetched($release->name)) {
            $storageFile = $storagePath.$storageFilename;
            $this->downloadRelease($this->client, $release->zipball_url, $storageFile);

            $this->unzipArchive($storageFile, $storagePath);
            $this->createReleaseFolder($storagePath, $release->name);
        }
    }
754860
private function getRepositoryUrlWithVersionPath($version)
    {
        $repositoryUrl = $this->repositoryUrl;
        if (in_array($version, array('master', $this->trunkPath))) {
            $repositoryUrl .= '/'.$this->trunkPath;
        } elseif (in_array($version, $this->getBranches())) {
            $repositoryUrl .= '/'.$this->branchesPath.'/'.$version;
        } elseif (in_array($version, $this->getTags())) {
            $repositoryUrl .= '/'.$this->tagsPath.'/'.$version;
        } else {
            return false;
        }

        return ProcessUtils::escapeArgument($repositoryUrl);
    }
1278880
public function version($version = null)
    {
        if (func_num_args() === 0) {
            return $this->_version;
        }
        $this->_version = $version;
        return $this;
    }
444967
public function getClientKey($uuid, $edition, $version)
    {
        $endPointUrl = $this->apiurl."/client/key/".$uuid."?edition=".$edition."&version=".$version;

        $response = $this->curlGet($endPointUrl);

        return $response;
    }
838977
public static function get_by_version($version) {
		$migrations = self::get_all();

		if (strpos($version, '/') === false) {
			$version = 'project/' . $version;
		}

		list($package, $version) = explode('/', $version);
		$migrations = \Skeleton\Database\Migration::get_between_versions($package);

		foreach ($migrations as $migration) {
			if (preg_match('@\\\\([\w]+)$@', get_class($migration), $matches)) {
				$classname = $matches[1];
			} else {
				$classname = get_class($migration);
			}
			if ($version == $classname) {
				return $migration;
			}

		}

		throw new \Exception('The specified version does not exists.');
	}
772216
public function getMetadata($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['metadata'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['metadata'];
	}
1251800
protected function getLastEditedForVersion($version)
    {
        Deprecation::notice('5.0', 'Use getLastEditedAndStageForVersion instead');
        $result = $this->getLastEditedAndStageForVersion($version);
        if ($result) {
            return reset($result);
        }
        return null;
    }
1257545
private static function fetchProtocolVersion(string $version): string
    {
        $v = substr($version, 5);

        if ($v === '2.0') {
            return '2';
        }

        // Fallback for values outside of valid protocol versions
        if (!in_array($v, static::$allowedVersions, true)) {
            return '1.1';
        }

        return $v;
    }
350293
public function getTimestamp($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['timestamp'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['timestamp'];
	}
206087
public function getUrl($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['url'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['url'];
	}
636594
public function get($key)
    {
        $key       = (string)$key;
        $this->hit = false;

        $inMemoryValue = InMemoryAdapter::getInstance()->get($key);
        if (InMemoryAdapter::getInstance()->isHit()) {
            $this->hit = true;
            return $inMemoryValue;
        }

        $fileKey = $this->getFilenameFromCacheKey($key);

        if (true === \file_exists($fileKey)) {
            $value = $this->restoreDataStructure(\file_get_contents($fileKey));
            if ($value['expires'] >= (new DateTime())) {
                $this->hit = true;
                InMemoryAdapter::getInstance()->set($key, $value['value'], 0);
                return $value['value'];
            }
            $this->removeCacheFile($fileKey);
            $this->deleteChain($key);
        }

        return (null !== $this->nextAdapter) ? $this->nextAdapter->get($key) : null;
    }
76651
public function get($version = null, $up = true)
    {
        $currentVersion = $this->schemaTable->getCurrentVersion();
        if (null !== $version && false === $up && (int) $version > (int) $currentVersion) {
            return null;
        }

        $files = $this->getFiles($up);

        if (!$this->fileVersionExists($version, $this->getFiles($up))) {
            return null;
        }

        $migrationFiles = array();
        foreach ($files as $file) {
            $filenameParser = new FileNameParser($file->getFileName());
            $isMigrated = in_array($filenameParser->getVersion(), $this->schemaTable->getVersions());
            $migrationFile = new MigrationFile($filenameParser->getMigrationName(), $file->getRealpath(),
                $filenameParser->getVersion(), $filenameParser->getMigrationClassName(), $isMigrated);

            if (false === $this->statusIntention) {
                if ($up && $isMigrated || !$up && !$isMigrated) {
                    continue;
                }
                if ($version == $migrationFile->getVersion()) {
                    $migrationFiles[] = $migrationFile;
                    break;
                }
            }
            $migrationFiles[] = $migrationFile;
        }

        return $migrationFiles;
    }
611243
public function get($key)
    {
        $getResult = $this->getValue($key);
        $unserialized = @unserialize($getResult);

        if (Util::hasInternalExpireTime($unserialized)) {
            $getResult = $unserialized['v'];
        }

        return $getResult;
    }
541251
public function getCommonMetadata($revision = null)
	{
		// Without revision, use current info
		if (!isset($revision)) {
			return $this->info['commonmetadata'];
		}

		// Obtain the properties of the revision
		if (($info = $this->getRevision($revision)) === null) {
			return null;
		}

		return $info['commonmetadata'];
	}
1055830
protected function legacyVersion($version)
    {
        $legacy = file_get_contents(__DIR__.'/../resources/legacy.json');

        $legacy = json_decode($legacy, true);

        return $legacy[$version];
    }