Returns installed ffmpeg version
@return array
544839
public static function getConverterVersion()
    {
        // Run terminal command to retrieve version
        $command = self::getConverterPath().' -version';
        $output  = shell_exec($command);

        // PREG pattern to retrive version information
        $ouput = preg_match("/ffmpeg version (?P<major>[0-9]{0,3}).(?P<minor>[0-9]{0,3}).(?P<revision>[0-9]{0,3})/", $output, $parsed);

        // Verify output
        if ($output === false || $output == 0)
        {
            return false;
        }

        // Assign array with variables
        $version = array(
            'major' => $parsed['major'],
            'minor' => $parsed['minor'],
            'rev'   => $parsed['revision']
            );

        return $version;
    }
589682
public function getVersion()
    {
        if ($this->version) {
            return $this->version;
        }

        if ($this->config->get('system.debug')) {
            return $this->version = md5(uniqid('Windwalker-Asset-Version', true));
        }

        $sumFile = $this->config->get('path.cache') . '/asset/MD5SUM';

        if (!is_file($sumFile)) {
            return $this->version = $this->detectVersion();
        }

        return $this->version = trim(file_get_contents($sumFile));
    }
1033869
public function getOperatingSystemVersion()
    {
        $os = $this->getOperatingSystem();

        return $this->prepareVersion([$os->major, $os->minor, $os->patch]);
    }
1055142
public static function getVersion()
	{
		$match = array();
		$content = @file_get_contents( dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'ext_emconf.php' );

		if( preg_match( "/'version' => '([^']+)'/", $content, $match ) === 1 ) {
			return $match[1];
		}

		return '';
	}
1047406
public function version()
    {
        $json = (string) $this->client->request('GET', '/')->getBody();
        $value = JSONEncoder::decode($json);

        return $value['version'];
    }
1129859
final protected function getVersion() {
        if(CB_VERSION!='@@VERSION@@') {
            return CB_VERSION.' '.CB_BUILD_DATE;
        }
        
        // Tries to obtain version number from composer.lock if it exists
        $composerLockPath=BASE_PATH.'/composer.lock';
        if(file_exists($composerLockPath)) {
            $cache=SS_Cache::factory('CodeBank_Version');
            $cacheKey=filemtime($composerLockPath);
            $version=$cache->load($cacheKey);
            if($version) {
                $version=$version;
            }else {
                $version='';
            }
            
            if(!$version && $jsonData=file_get_contents($composerLockPath)) {
                $lockData=json_decode($jsonData);
                if($lockData && isset($lockData->packages)) {
                    foreach ($lockData->packages as $package) {
                        if($package->name=='undefinedoffset/silverstripe-codebank' && isset($package->version)) {
                            $version=$package->version;
                            break;
                        }
                    }
                    
                    $cache->save($version, $cacheKey);
                }
            }
        }
        
        if(!empty($version)) {
            return $version;
        }
        
        return _t('CodeBank.DEVELOPMENT_BUILD', '_Development Build');
    }
288798
public function getServerVersion()
    {
        $serverInfos = $this->conn->get_server_info();
        if (stripos($serverInfos, 'mariadb') !== false) {
            return $serverInfos;
        }

        $majorVersion = floor($this->conn->server_version / 10000);
        $minorVersion = floor(($this->conn->server_version - $majorVersion * 10000) / 100);
        $patchVersion = floor($this->conn->server_version - $majorVersion * 10000 - $minorVersion * 100);

        return $majorVersion . '.' . $minorVersion . '.' . $patchVersion;
    }
151020
private static function getPhpVersionInfo()
    {
        $currentVersionFull = PHP_VERSION;
        preg_match("#^\d+(\.\d+)*#", $currentVersionFull, $filtered);
        $currentVersion = $filtered[0];

        return [
            'full' => $currentVersionFull,
            'version' => $currentVersion
        ];
    }
652851
public static function getTheliaSimpleVersion()
    {
        $majorVersion = self::read('thelia_major_version');
        $minorVersion = self::read('thelia_minus_version');
        $releaseVersion = self::read('thelia_release_version');

        return $majorVersion.'.'.$minorVersion.'.'.$releaseVersion;
    }
1099315
public static function getVersionList()
    {
        $app = Application::getFacadeApplication();
        $config = $app->make('config');
        $createHightDPIVersions = (bool) $config->get('concrete.file_manager.images.create_high_dpi_thumbnails');

        $types = static::getList();
        $versions = [];

        foreach ($types as $type) {
            $versions[] = $type->getBaseVersion();
            if ($createHightDPIVersions) {
                $versions[] = $type->getDoubledVersion();
            }
        }

        return $versions;
    }
1101020
public static function get_all_versions() : array {
        global $CFG;

        self::init();

        $versions = array();

        // Main version first.
        $versions['core'] = self::fetch_core_version();

        // The problem here is tha the component cache might be stable,
        // we want this to work also on frontpage without resetting the component cache.
        $usecache = false;
        if (CACHE_DISABLE_ALL or (defined('IGNORE_COMPONENT_CACHE') and IGNORE_COMPONENT_CACHE)) {
            $usecache = true;
        }

        // Now all plugins.
        $plugintypes = core_component::get_plugin_types();
        foreach ($plugintypes as $type => $typedir) {
            if ($usecache) {
                $plugs = core_component::get_plugin_list($type);
            } else {
                $plugs = self::fetch_plugins($type, $typedir);
            }
            foreach ($plugs as $plug => $fullplug) {
                $plugin = new stdClass();
                $plugin->version = null;
                $module = $plugin;
                include($fullplug.'/version.php');
                $versions[$type.'_'.$plug] = $plugin->version;
            }
        }

        return $versions;
    }
765963
public function getComposerPackageData()
    {
        $moduleVersions = [];

        $installedJsonFile = getcwd() . '/../vendor/composer/installed.json';
        $packages = json_decode(file_get_contents($installedJsonFile));

        if (count($packages) > 0) {
            foreach ($packages as $package) {
                $name = $package->name;

                /**
                 * get latest stable version of the package
                 */
                $latestStable = $this->getLatestPackage($name);

                /**
                 * prepare result
                 */
                $moduleVersions[] = [
                    'name' => $name,
                    'installed_version' => $package->version,
                    'installed_version_licences' => $package->license,
                    'newest_version' => $latestStable->version,
                    'newest_version_licences' => $latestStable->license,
                ];
            }
        }

        return $moduleVersions;
    }
382263
public function getVersion()
    {
        $version = $this->getProjectVersion();

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

        return $version;
    }
348116
public function getStaticVersions(): array
	{
		$result = false;
		try
		{
			// Fetch StaticData from JSON files
			$result = DataDragonAPI::getStaticVersions();
			if (!$result) throw new ServerException("StaticData failed to be loaded.");

			$this->result_data = $result;
		}
		catch (DataDragonExceptions\ArgumentException $ex)
		{
			throw new RequestException($ex->getMessage(), $ex->getCode());
		}
		finally
		{
			// Return data
			return $result;
		}
	}
718104
public function getVersion()
    {
        $modules = $this->getModules();
        $lockModules = $this->getModuleVersionFromComposer(array_keys($modules));
        $output = [];
        foreach ($modules as $module => $title) {
            $version = isset($lockModules[$module])
                ? $lockModules[$module]
                : _t(__CLASS__ . '.VERSIONUNKNOWN', 'Unknown');
            $output[] = $title . ': ' . $version;
        }
        return implode(', ', $output);
    }
864819
public function getVersion()
    {
        $url = $this->getBaseUrl() . 'config/server/version';
        $response = $this->getConnector()->get($url);
        $response = $this->verifyResult($response, $url);

        $content = $this->transformJsonResponse($response->getContent());

        return $content;
    }
463366
public static function getSolrMajorVersion() {
        $type = static::getSolrType();
        $version = FALSE;
        if ($type) {
            list(, $version) = explode(":", $type);
            if (preg_match('/^(\d)\./', $version, $matches)) {
                $version = $matches[1];
            }
            else {
                $version = '4';
            }
            // Platform support 3,4 and 6 atm. We only support 4 and 6.
            if ($version === '3') {
                $version = '4';
            }
        }
        return $version;
    }