Version
in package
Table of Contents
- $buildMetadata : null|BuildMetaData
- $major : VersionNumber
- $minor : VersionNumber
- $originalVersionString : string
- $patch : VersionNumber
- $preReleaseSuffix : null|PreReleaseSuffix
- __construct() : mixed
- equals() : bool
- getBuildMetaData() : BuildMetaData
- getMajor() : VersionNumber
- getMinor() : VersionNumber
- getOriginalString() : string
- getPatch() : VersionNumber
- getPreReleaseSuffix() : PreReleaseSuffix
- getVersionString() : string
- hasBuildMetaData() : bool
- hasPreReleaseSuffix() : bool
- isGreaterThan() : bool
- ensureVersionStringIsValid() : void
- parseVersion() : void
Properties
$buildMetadata
private
null|BuildMetaData
$buildMetadata
$major
private
VersionNumber
$major
$minor
private
VersionNumber
$minor
$originalVersionString
private
string
$originalVersionString
$patch
private
VersionNumber
$patch
$preReleaseSuffix
private
null|PreReleaseSuffix
$preReleaseSuffix
Methods
__construct()
public
__construct(string $versionString) : mixed
Parameters
- $versionString : string
Return values
mixed —equals()
public
equals(Version $other) : bool
Parameters
- $other : Version
Return values
bool —getBuildMetaData()
public
getBuildMetaData() : BuildMetaData
Tags
Return values
BuildMetaData —getMajor()
public
getMajor() : VersionNumber
Return values
VersionNumber —getMinor()
public
getMinor() : VersionNumber
Return values
VersionNumber —getOriginalString()
public
getOriginalString() : string
Return values
string —getPatch()
public
getPatch() : VersionNumber
Return values
VersionNumber —getPreReleaseSuffix()
public
getPreReleaseSuffix() : PreReleaseSuffix
Tags
Return values
PreReleaseSuffix —getVersionString()
public
getVersionString() : string
Return values
string —hasBuildMetaData()
public
hasBuildMetaData() : bool
Tags
Return values
bool —hasPreReleaseSuffix()
public
hasPreReleaseSuffix() : bool
Return values
bool —isGreaterThan()
public
isGreaterThan(Version $version) : bool
Parameters
- $version : Version
Return values
bool —ensureVersionStringIsValid()
private
ensureVersionStringIsValid(string $version) : void
Parameters
- $version : string
Tags
Return values
void —parseVersion()
private
parseVersion(array<string|int, string> $matches) : void
Parameters
- $matches : array<string|int, string>