Set from the complete version string.

@param string $complete
337456
public function setComplete($complete)
    {
        // check if the version has only 0 -> so no real result
        // maybe move this out to the Providers itself?
        $left = preg_replace('/[0._]/', '', $complete);
        if ($left === '') {
            $complete = null;
        }

        $this->hydrateFromComplete($complete);

        $this->complete = $complete;
    }
400645
public function remove($part)
    {
        foreach ($this->parts as $key => $value) {
            if ($value instanceof self) {
                $value->remove($part);
            } elseif ($value === $part) {
                unset($this->parts[$key]);
            }
        }
    }
1320587
public function setDecimals(string $decimals)
    {
        if (empty($decimals)) {
            Throw new PasswordException('Decimals cannot be an empty string.');
        }

        $this->decimals = $decimals;
    }
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;
    }
1283294
public static function SetVersion($number)
    {
        self::CheckBackend();

        $number = trim($number);

        self::$backend->Set("version", $number);
    }
640290
public function setVersion($version)
    {
        if (Version::isKnown($version) === true) {
            $this->version = Version::appendPatchVersion($version);
        } else {
            $msg = "Version '{$version}' is not a known QTI version. Known versions are '" . implode(', ', Version::knownVersions()) . "'";
            throw new InvalidArgumentException($msg);
        }
    }
1176648
public function setCharset($charset)
    {
        $this->clearCachedValueIf($charset != $this->charset);
        $this->charset = $charset;
        if (isset($this->encoder)) {
            $this->encoder->charsetChanged($charset);
        }
    }
234425
public function setTitle($title)
	{
		if ( $title == $this->getTitle() ) { return; }

		$this->_values['title'] = (string) $title;
		$this->setModified();
	}
1366328
protected function setReleaseVersion()
    {
        try {
            $currentVersion = Context::get('version-persister')->getCurrentVersion();
        } catch (\Exception $e) {
            $currentVersion = Context::get('version-generator')->getInitialVersion();
        }

        $this->releaseVersion = Context::get('version-generator')->generateNextVersion($currentVersion);
    }
1130783
public function setVersion($version)
    {
        if (!in_array($version, $this->supportedVersions)) {
            $this->throwError('The version ' . $version . ' is not supported by this library');
        }

        $this->version = $version;

        return $this;
    }
1103716
private function setComposerVersion($semver)
    {
        $this->composerJson['version'] = $semver->getVersion();
        file_put_contents(
            'composer.json',
            json_encode($this->composerJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
        );
    }
553207
public function setValue($value) {
		if(is_string($value) && $this->getOption('trim'))
			$value = trim($value);

		$this->value = $value;
	}
531344
public function setName( $value )
	{
		if ( $value == $this->getName() ) { return; }

		$this->_values['name'] = (string) $value;
		$this->setModified();
	}
1346406
public function setComplete()
    {
        if (!$this->isStaticComplete()) {
            $this->setStaticComplete();
        }
        $this->complete = true;
        $this->emit('complete');
    }
1046313
public function setValue($value)
    {
        // special case for boolean values
        if (is_bool($value)) {
            if ($value) {
                $this->_value = "true";
            } else {
                $this->_value = "false";
            }
        } else {
            $this->_value = (string) $value;
        }
    }
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;
    }
1361157
public function mergePartialFromString($s) {
    // Merges in data from the string 's'.
    // Does not enforce required fields are set.
    $d = new Decoder($s, 0, strlen($s));
    $this->tryMerge($d);
  }