Get repository version.

@uses \Eliasis\Complement\Complement->$complement
@uses \Josantonius\Json\Json::fileToArray

@return string → repository version
162042
public function getRepositoryVersion()
    {
        $version = $this->complement['version'];

        if (! isset($this->complement['config-url'])) {
            return $version;
        }

        if (! File::exists($this->complement['config-url'])) {
            return $version;
        }

        $config = Json::fileToArray($this->complement['config-url']);
        $version = isset($config['version']) ? $config['version'] : $version;

        return $version;
    }
326745
public static function getElggVersion() {

		if (isset(self::$version)) {
			return self::$version;
		}

		if (is_callable('elgg_get_version')) {
			return elgg_get_version(true);
		} else {
			$path = self::getRootPath() . '/version.php';
			if (!include($path)) {
				return false;
			}
			self::$version = $release;
			return self::$version;
		}
	}
1248171
private static function getLibraryVersion()
    {

        $path = dirname(__FILE__) . '/../../composer.json';

        if (file_exists($path)) {
            $contents = file_get_contents($path);
            $contents = utf8_encode($contents);

            $composer = json_decode($contents, true);
        } else {
            $composer["version"] = "N/A";
        }

        return $composer["version"];
    }
687227
private function getVersion()
    {
        $select = new QueryBuilder();
        $versionRow = $select
            ->query("SELECT value FROM {$this->table} WHERE param = 'migration_version'")
            ->fetchRow();

        if (!isset($versionRow['value'])) die("Error: Please init the Crater Migration");
        return $versionRow['value'];
    }
649014
public function setVersion() {
		$wp_filesystem = self::getWpFilesystem();

		// Get installed composer package data.
		$installedFile = wp_normalize_path( realpath( __DIR__ . '/../../../../' ) ) . '/composer/installed.json';

		if ( 'direct' === get_filesystem_method() ) {
			$file = $wp_filesystem->get_contents(  $installedFile );
		} else {
			$installedUrl = str_replace( ABSPATH, get_site_url() . '/', $installedFile );
			$file = wp_remote_retrieve_body( wp_remote_get( $installedUrl ) );
		}

		$installed = json_decode( $file, true );

		// Check for dep's installed version.
		$version = null;
		if ( $installed ) {
			foreach( $installed as $key => $value ) {
				if ( $value['name'] === $this->getDependency() ) {
					$version = $value['version_normalized'];
					break;
				}
			}
		}

		return $version;
	}
512453
public function getRepository()
    {
        $repository = MigrationsRepository::getInstance()
            ->setCommand($this)
            ->setIo($this->io);

        $repository['path'] = $this->console->get('migration.dir') ?: $this->console->get('path.migrations');

        return $repository;
    }
1131145
private function getUpgradeRepository()
    {
        $upgradeFile = $this->getTensideDataDir() . DIRECTORY_SEPARATOR . 'upgrades.json';
        if (!file_exists($upgradeFile)) {
            return null;
        }

        $packageLoader  = new ArrayLoader();
        $packageChanges = new WritableArrayRepository();
        $upgrades       = new JsonFile($upgradeFile, null);
        foreach ($upgrades->getEntries('/') as $packageName) {
            if ($pkgData = $upgrades->get($packageName . '/target')) {
                $packageChanges->addPackage($packageLoader->load($pkgData));
            }
        }

        return $packageChanges;
    }
161686
public function getVersion()
    {
        $version = explode('-', parent::getVersion());

        if (isset($version[1]) && 0 === strpos($version[1], '$')) {
            return "{$version[0]}-source";
        }

        return implode('-', $version);
    }
976029
public function getServerVersion()
    {
        $this->_connect();
        $server_info = db2_server_info($this->_connection);
        if ($server_info !== false) {
            $version = $server_info->DBMS_VER;
            if ($this->_isI5) {
                $version = (int) substr($version, 0, 2) . '.' . (int) substr($version, 2, 2) . '.' . (int) substr($version, 4);
            }
            return $version;
        } else {
            return null;
        }
    }
1103136
protected function getVersion()
    {
        static $version;
        if (!$version) {
            $version = false;
            $string = $this->execute(['--version'], false);
            if ($string && preg_match('/(^| )([0-9]+[^ ]*)/', $string, $matches)) {
                $version = $matches[2];
            }
        }

        return $version;
    }
475448
private function getRepository()
    {
        $c = $this->repository;
        if ($c instanceof \Closure) {
            $this->repository = $c();
        }

        return $this->repository;
    }
584476
public function getVersion()
    {
        if ($package = $this->getComposerInstall()) {
            if ($package->version === 'dev-master') {
                return 'dev-master (' . substr($package->source->reference, 0, 8) . ')';
            }
            return 'v' . $package->version;
        }
        return 'v' . self::$VERSION;
    }
720472
function getVersion()
    {
        if (empty($this->version))
            $this->version = self::Vx1_1;
        
        return $this->version;
    }
382263
public function getVersion()
    {
        $version = $this->getProjectVersion();

        if (APPLICATION_ENV !== 'production' && APPLICATION_ENV !== 'acceptance' && APPLICATION_ENV !== 'demo') {
            $version .= '.' . $this->getBuild() . ' [' . APPLICATION_ENV . ']';
        }

        return $version;
    }
1013620
public function version()
    {
        $this->sendCommand('version');
        $res = fgets($this->conn, 4096);
        $this->checkForError($res);

        return trim($res);
    }
270371
public function getFileNameVersioned()
	{
		return static::buildFileNameVersioned($this->strFileName, static::getVersionForFileName($this->intVersionMajor, $this->intVersionMinor, $this->intVersionPatch), $this->strFileType);
	}
1295487
public function getVersion()
    {
        $request = $this->apiRequestFactory->createRequest('GET', $this->getBaseUri() . '/version');
        $response = $this->httpClient->sendRequest($request);

        return $this->getResult($response, Version::class);
    }