Set the version held by this entry.

@param float $version
The size of the entries leave room for
exactly four digits: two digits on either side of the decimal
point.
969052
public function setValue($version = 0.0)
    {
        $this->version = $version;
        $major = floor($version);
        $minor = ($version - $major) * 100;
        $strValue = sprintf('%02.0f%02.0f', $major, $minor);
        $this->components = strlen($strValue);
        $this->bytes = $strValue;
    }
1172658
public static function initByVersion( string $version, array $customSettings = [] )
	{
		self::setSettings([
			self::SET_VERSION  => $version,
			self::SET_ENDPOINT => self::getCdnUrl(),
		]);

		if (!empty($customSettings))
			self::setSettings($customSettings);

		self::$initialized = true;
	}
68338
public static function convertDateVersion($version)
    {
        if (preg_match('/^\d{7,}\./', $version)) {
            $pos = strpos($version, '.');
            $version = substr($version, 0, $pos).self::convertDateMinorVersion(substr($version, $pos + 1));
        }

        return $version;
    }
202610
public function getCharacterCountBits(Version $version) : int
    {
        $number = $version->getVersionNumber();

        if ($number <= 9) {
            $offset = 0;
        } elseif ($number <= 26) {
            $offset = 1;
        } else {
            $offset = 2;
        }

        return $this->characterCountBitsForVersions[$offset];
    }
341543
public function selectVersion($version)
	{
		if ( ! in_array($version, $this->versions))
		{
			// not a value version
			return false;
		}

		$this->version = $version;

		return $this;
	}
948707
public function addVersion( PhpVersion $version ) {
		$versionString = $version->getVersion();

		$this->phpVersions[$versionString] = $version;

		return $this;
	}
849190
public function setVersion(string $version)
    {
        if (Validation::isValidVersionRegex($version)) {
            $this->version = $version;
        } else {
            throw new CustomException('Malformed version');
        }
    }
1160251
public function setToolVersion($toolVersion)
    {
        if (Format::isString256($toolVersion) === true) {
            $this->toolVersion = $toolVersion;
        } else {
            $msg = "The toolVersion argument must be a string with at most 256 characters.";
            throw new InvalidArgumentException($msg);
        }
    }
1077433
protected function setVersion($version)
    {
        // Set version of browser
        $this->version = $version;

        // If major and minor versions hasn't been set
        // we'll set them by parsing version.
        //
        // If version doesn't contain a "." then we'll only
        // set the major version.
        if (empty($this->majorVersion) && strpos($version, '.') !== false) {
            // Split version by comma
            $version = explode('.', $version);

            // Set major and minor version
            $this->majorVersion = (int) isset($version[0]) ? $version[0] : 0;
            $this->minorVersion = (int) isset($version[1]) ? $version[1] : 0;
        } else {
            $this->majorVersion = (int) $version;
        }

        return $this;
    }
1278168
public function setLocale($locale)
	{
		if(is_string($locale))
			$locale=CLocale::getInstance($locale);
		$this->sizeFormat['decimalSeparator']=$locale->getNumberSymbol('decimal');
		$this->_locale=$locale;
	}
734362
public static function majorVersion($version)
    {
        $components = explode('.', $version);
        foreach ($components as $key => $value) {
            if ($key > 0 && is_numeric($value)) {
                $components[$key] = '0';
            }
        }

        return implode('.', $components);
    }
1271721
public function setVersion($version)
    {
        if($version < 0 || $version > Constants::QRSPEC_VERSION_MAX) {
            throw new Exception('Invalid version no');
            return -1;
        }

        $this->version = $version;

        return 0;
    }
643259
public function setVersion($version)
    {
        if ($version != '1.1' && $version != '1.0') {
            throw new InvalidArgumentException('Not valid or not supported HTTP version: ' . $version);
        }

        $this->_version = $version;
        return $this;
    }
551048
public function setVersion(string $version)
    {
        if (!preg_match('/^\d+\.\d+\.\d+$/', $version)) {
            throw new \InvalidArgumentException(
                'Version number is invalid; ' . $version . ' does not match '
                . 'x.x.x (where x is a number)'
            );
        }

        $this->version = $version;
    }
883166
public function setVersion(ResourceInterface $resource, $version) {
		if ($resource instanceof ResourceDocument) {
			$resource->addMeta($this->getKeyword('version'), $version, $level=Document::LEVEL_RESOURCE);
		}
		else {
			$resource->addMeta($this->getKeyword('version'), $version);
		}
	}
941271
public function setVersion(string $version)
    {
        if (!preg_match(self::VERSION_PATTERN, $version)) {
            // Invalid version string
            throw new Exception('Version string must be of YYYY-MM or unstable');
        }

        $this->version = $version;

        return $this;
    }
618991
public function estimateBitStreamSize($version)
    {
        $bits = 0;

        foreach($this->items as $item) {
            $bits += $item->estimateBitStreamSizeOfEntry($version);
        }

        return $bits;
    }