Returns the current version string for a specified update channel. $channel must be set to
one of the following values:

- stable
- beta
- alpha
- server

@param  string  $channel
@throws TeamSpeak3_Adapter_Update_Exception
@return integer
3650
public function getVersion($channel = "stable")
  {
    switch($channel)
    {
      case "stable":
        return isset($this->version_strings[0]) ? $this->version_strings[0] : null;

      case "beta":
        return isset($this->version_strings[1]) ? $this->version_strings[1] : null;

      case "alpha":
        return isset($this->version_strings[2]) ? $this->version_strings[2] : null;

      case "server":
        return isset($this->version_strings[3]) ? $this->version_strings[3] : null;

      default:
        throw new TeamSpeak3_Adapter_Update_Exception("invalid update channel identifier (" . $channel . ")");
    }
  }
1279928
public function getAdapterType()
  {
    if($this->adapter instanceof TeamSpeak3_Adapter_Abstract)
    {
      $string = TeamSpeak3_Helper_String::factory(get_class($this->adapter));

      return $string->substr($string->findLast("_"))->replace(array("_", " "), "")->toString();
    }

    return "Unknown";
  }
515861
public function getVersionAvailable($prepend = '', $append = '') : string
    {
        $version = '';
        if ($this->versionFileExists()) {
            $version = $this->getVersionFile();
        } else {
            $releaseCollection = $this->getPackageReleases();
            if ($releaseCollection->isEmpty()) {
                throw new \Exception('Retrieved version list is empty.');
            }
            $version = $releaseCollection->first()->name;
        }

        return $version;
    }
776278
public function getUpdatedAt() : ?string 
    {
        if ( ! $this->hasUpdatedAt()) {
            $this->setUpdatedAt($this->getDefaultUpdatedAt());
        }
        return $this->updatedAt;
    }
470270
public function channelSpacerGetType($cid)
    {
        $channel = $this->channelGetById($cid);

        if (!$this->channelIsSpacer($channel)) {
            throw new Ts3Exception("invalid channel flags", 0x307);
        }

        switch ($channel["channel_name"]->section("]", 1)) {
            case "___":
                return Teamspeak::SPACER_SOLIDLINE;

            case "---":
                return Teamspeak::SPACER_DASHLINE;

            case "...":
                return Teamspeak::SPACER_DOTLINE;

            case "-.-":
                return Teamspeak::SPACER_DASHDOTLINE;

            case "-..":
                return Teamspeak::SPACER_DASHDOTDOTLINE;

            default:
                return Teamspeak::SPACER_CUSTOM;
        }
    }
437788
public static function compare($version)
    {
        $currentVersion = str_replace(' ', '', strtolower(self::VERSION));
        $version        = str_replace(' ', '', $version);

        return version_compare($version, $currentVersion);
    }
880516
private function getOracleMysqlVersionNumber(string $versionString) : string
    {
        if (! preg_match(
            '/^(?P<major>\d+)(?:\.(?P<minor>\d+)(?:\.(?P<patch>\d+))?)?/',
            $versionString,
            $versionParts
        )) {
            throw DBALException::invalidPlatformVersionSpecified(
                $versionString,
                '<major_version>.<minor_version>.<patch_version>'
            );
        }
        $majorVersion = $versionParts['major'];
        $minorVersion = $versionParts['minor'] ?? 0;
        $patchVersion = $versionParts['patch'] ?? null;

        if ($majorVersion === '5' && $minorVersion === '7' && $patchVersion === null) {
            $patchVersion = '9';
        }

        return $majorVersion . '.' . $minorVersion . '.' . $patchVersion;
    }
86547
static public function getFromSocket($socket) {
        try {
            $version = $socket->getVersion();
        } catch (Mage_Core_Exception $e) {
            Mage::getSingleton('core/session')
                ->addError('Error determining Varnish version: '.
                    $e->getMessage());
            return null;
        }
        switch ($version) {
            case '4.0':
            case '4.1':
                return Mage::getModel(
                    'turpentine/varnish_configurator_version4',
                    array('socket' => $socket) );

            case '3.0':
                return Mage::getModel(
                    'turpentine/varnish_configurator_version3',
                        array('socket' => $socket) );
            case '2.1':
                return Mage::getModel(
                    'turpentine/varnish_configurator_version2',
                        array('socket' => $socket) );
            default:
                Mage::throwException('Unsupported Varnish version');
        }
    }
220170
public function subscriberByChannel(string $channel): ?Subscriber
    {
        $key = self::SUBSCRIBER_KEY.".{$channel}";

        return $this->cache->get($key);
    }
405028
public function getCurrentRemoteVersion(Updater $updater)
    {
        /** Switch remote request errors to HttpRequestExceptions */
        set_error_handler(array($updater, 'throwHttpRequestException'));
        $version = get_contents($this->getVersionUrl());
        restore_error_handler();
        if (false === $version) {
            throw new HttpRequestException(sprintf(
                'Request to URL failed: %s', $this->getVersionUrl()
            ));
        }
        if (empty($version)) {
            throw new HttpRequestException(
                'Version request returned empty response.'
            );
        }
        if (!preg_match('%^[a-z0-9]{40}%', $version, $matches)) {
            throw new HttpRequestException(
                'Version request returned incorrectly formatted response.'
            );
        }

        return $matches[0];
    }
533369
public function subChannelGetById($cid)
  {
    if(!array_key_exists((int) $cid, $this->subChannelList()))
    {
      throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channelID", 0x300);
    }

    return $this->channelList[(int) $cid];
  }
1209382
public static function get_version($package = 'project') {
		if (Config::$version_storage == 'file') {
			return self::file_get_version($package);
		} elseif (Config::$version_storage == 'database') {
			return self::database_get_version($package);
		} else {
			throw new \Exception('Incorrect "version_storage" config setting');
		}
	}
181639
private function getVersion($request)
    {
        $version = $request->getParameter("oauth_version");
        if (!$version) {
            $version = 1.0;
        }
        if ($version && $version != $this->version) {
            throw new Exception("OAuth version '$version' not supported");
        }
        return $version;
    }
310549
public function channel($channel)
    {
        $channel = $this->client->get(config('twitch-api.api_url') . '/kraken/channels/' . $channel);

        return $channel->json();
    }
236564
public function getVersion(int $mode = VersionInterface::COMPLETE): string
    {
        $versions     = $this->toArray();
        $microIsEmpty = false;

        if (VersionInterface::IGNORE_MICRO & $mode) {
            unset($versions['micro'], $versions['patch'], $versions['micropatch'], $versions['stability'], $versions['build']);
            $microIsEmpty = true;
        } elseif ((VersionInterface::IGNORE_MICRO_IF_EMPTY & $mode)
            || (VersionInterface::IGNORE_MINOR_IF_EMPTY & $mode)
            || (VersionInterface::IGNORE_MAJOR_IF_EMPTY & $mode)
        ) {
            if (empty($versions['micro']) || '00' === $versions['micro']) {
                $microIsEmpty = true;
            }

            if ($microIsEmpty && (VersionInterface::IGNORE_MICRO_IF_EMPTY & $mode)) {
                unset($versions['micro'], $versions['patch'], $versions['micropatch'], $versions['stability'], $versions['build']);
            }
        }

        $minorIsEmpty = false;

        if (VersionInterface::IGNORE_MINOR & $mode) {
            unset($versions['minor'], $versions['micro'], $versions['patch'], $versions['micropatch'], $versions['stability'], $versions['build']);
            $minorIsEmpty = true;
        } elseif ((VersionInterface::IGNORE_MINOR_IF_EMPTY & $mode)
            || (VersionInterface::IGNORE_MAJOR_IF_EMPTY & $mode)
        ) {
            if ($microIsEmpty && (empty($versions['minor']) || '00' === $versions['minor'])) {
                $minorIsEmpty = true;
            }

            if ($minorIsEmpty && (VersionInterface::IGNORE_MINOR_IF_EMPTY & $mode)) {
                unset($versions['minor'], $versions['micro'], $versions['patch'], $versions['micropatch'], $versions['stability'], $versions['build']);
            }
        }

        $macroIsEmpty = false;

        if (VersionInterface::IGNORE_MAJOR_IF_EMPTY & $mode) {
            if ($minorIsEmpty && (empty($versions['major']) || '00' === $versions['major'])) {
                $macroIsEmpty = true;
            }

            if ($macroIsEmpty) {
                unset($versions['major'], $versions['minor'], $versions['micro'], $versions['patch'], $versions['micropatch'], $versions['stability'], $versions['build']);
            }
        }

        if (!isset($versions['major'])) {
            if (VersionInterface::GET_ZERO_IF_EMPTY & $mode) {
                return '0';
            }

            return '';
        }

        return $versions['major']
            . (isset($versions['minor']) ? '.' . $versions['minor'] : '')
            . (isset($versions['micro']) ? '.' . $versions['micro'] . (isset($versions['patch']) ? '.' . $versions['patch'] . (isset($versions['micropatch']) ? '.' . $versions['micropatch'] : '') : '') : '')
            . ((isset($versions['stability']) && 'stable' !== $versions['stability']) ? '-' . $versions['stability'] : '')
            . (isset($versions['build']) ? '+' . $versions['build'] : '');
    }
972622
protected static function getVersionForPackage(string $package): string
    {
        try {
            $shortVersion = PrettyVersions::getVersion($package)
                ->getShortVersion()
            ;

            // Removes the ".x-dev" part which is inserted during development
            if ('.x-dev' === \mb_substr($shortVersion, -6)) {
                $shortVersion = \mb_substr($shortVersion, 0, -6).'-dev';
            }

            return $shortVersion;
        } catch (\OutOfBoundsException $exception) {
            return '0.0.0-alpha';
        }
    }
1038647
function Version()
	{
		$ver = (is_null($this) ? XDB_VERSION : $this->version);
		$str = sprintf("%s/%d.%d", XDB_TAGNAME, ($ver >> 5), ($ver & 0x1f));
		if (!is_null($this)) $str .= " <base={$this->hash_base}, prime={$this->hash_prime}>";
		return $str;
	}