Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Version.php

function Version::parseVersion

Parameters

string[] $matches:

Throws

InvalidPreReleaseSuffixException

1 call to Version::parseVersion()
Version::ensureVersionStringIsValid in vendor/phar-io/version/src/Version.php

File

vendor/phar-io/version/src/Version.php, line 163

Class

Version

Namespace

PharIo\Version

Code

private function parseVersion(array $matches) : void {
    $this->major = new VersionNumber((int) $matches['Major']);
    $this->minor = new VersionNumber((int) $matches['Minor']);
    $this->patch = isset($matches['Patch']) ? new VersionNumber((int) $matches['Patch']) : new VersionNumber(0);
    if (isset($matches['PreReleaseSuffix']) && $matches['PreReleaseSuffix'] !== '') {
        $this->preReleaseSuffix = new PreReleaseSuffix($matches['PreReleaseSuffix']);
    }
    if (isset($matches['BuildMetadata'])) {
        $this->buildMetadata = new BuildMetaData($matches['BuildMetadata']);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal