Version
in package
Embed version informations.
Table of Contents
- $buildMetadata : mixed
- $stabilityVersion : mixed
- $version : mixed
- __construct() : mixed
- __toString() : mixed
- getBranchVersion() : mixed
- getBuildMetadata() : mixed
- getMajor() : mixed
- getMinor() : mixed
- getNextMajorVersion() : string
- Returns the next major version 2.1.3 -> 3.0.0 2.1b1.4 -> 3.0.0.
- getNextMinorVersion() : string
- Returns the next minor version 2.1.3 -> 2.2 2.1 -> 2.2 2.1b1.4 -> 2.2.
- getNextPatchVersion() : string
- Returns the next patch version 2.1.3 -> 2.1.4 2.1b1.4 -> 2.2.
- getNextTailVersion() : string
- returns the next version, by incrementing the last number, whatever it is.
- getPatch() : mixed
- getStabilityVersion() : mixed
- getTailNumbers() : mixed
- getVersionArray() : mixed
- hasMinor() : mixed
- hasPatch() : mixed
- toString() : mixed
Properties
$buildMetadata
private
mixed
$buildMetadata
= ''
$stabilityVersion
private
mixed
$stabilityVersion
= array()
$version
private
mixed
$version
= array()
Methods
__construct()
public
__construct(array<string|int, int> $version[, array<string|int, string> $stabilityVersion = array() ][, mixed $buildMetadata = '' ]) : mixed
Parameters
- $version : array<string|int, int>
-
list of numbers of the version (ex: [1,2,3] for 1.2.3)
- $stabilityVersion : array<string|int, string> = array()
-
list of stability informations that are informations following a '-' in a semantic version (ex: ['alpha', '2'] for 1.2.3-alpha.2)
- $buildMetadata : mixed = ''
Return values
mixed —__toString()
public
__toString() : mixed
Return values
mixed —getBranchVersion()
public
getBranchVersion() : mixed
Return values
mixed —getBuildMetadata()
public
getBuildMetadata() : mixed
Return values
mixed —getMajor()
public
getMajor() : mixed
Return values
mixed —getMinor()
public
getMinor() : mixed
Return values
mixed —getNextMajorVersion()
Returns the next major version 2.1.3 -> 3.0.0 2.1b1.4 -> 3.0.0.
public
getNextMajorVersion() : string
Return values
string —the next version
getNextMinorVersion()
Returns the next minor version 2.1.3 -> 2.2 2.1 -> 2.2 2.1b1.4 -> 2.2.
public
getNextMinorVersion() : string
Return values
string —the next version
getNextPatchVersion()
Returns the next patch version 2.1.3 -> 2.1.4 2.1b1.4 -> 2.2.
public
getNextPatchVersion() : string
Return values
string —the next version
getNextTailVersion()
returns the next version, by incrementing the last number, whatever it is.
public
getNextTailVersion() : string
If the version has a stability information (alpha, beta etc..), it returns only the version without stability version.
Return values
string —the next version
getPatch()
public
getPatch() : mixed
Return values
mixed —getStabilityVersion()
public
getStabilityVersion() : mixed
Return values
mixed —getTailNumbers()
public
getTailNumbers() : mixed
Return values
mixed —getVersionArray()
public
getVersionArray() : mixed
Return values
mixed —hasMinor()
public
hasMinor() : mixed
Return values
mixed —hasPatch()
public
hasPatch() : mixed
Return values
mixed —toString()
public
toString([bool $withPatch = true ]) : mixed
Parameters
- $withPatch : bool = true
-
true, it returns always x.y.z even if no patch or minor version was given