Version
in package
Table of Contents
Properties
- $buildMetadata : null|BuildMetaData
- $major : VersionNumber
- $minor : VersionNumber
- $originalVersionString : string
- $patch : VersionNumber
- $preReleaseSuffix : null|PreReleaseSuffix
Methods
- __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
equals()
public
equals(Version $other) : bool
Parameters
- $other : Version
Return values
boolgetBuildMetaData()
public
getBuildMetaData() : BuildMetaData
Tags
Return values
BuildMetaDatagetMajor()
public
getMajor() : VersionNumber
Return values
VersionNumbergetMinor()
public
getMinor() : VersionNumber
Return values
VersionNumbergetOriginalString()
public
getOriginalString() : string
Return values
stringgetPatch()
public
getPatch() : VersionNumber
Return values
VersionNumbergetPreReleaseSuffix()
public
getPreReleaseSuffix() : PreReleaseSuffix
Tags
Return values
PreReleaseSuffixgetVersionString()
public
getVersionString() : string
Return values
stringhasBuildMetaData()
public
hasBuildMetaData() : bool
Tags
Return values
boolhasPreReleaseSuffix()
public
hasPreReleaseSuffix() : bool
Return values
boolisGreaterThan()
public
isGreaterThan(Version $version) : bool
Parameters
- $version : Version
Return values
boolensureVersionStringIsValid()
private
ensureVersionStringIsValid(string $version) : void
Parameters
- $version : string
Tags
parseVersion()
private
parseVersion(array<string|int, string> $matches) : void
Parameters
- $matches : array<string|int, string>