Version
in package
Encapsulates a version number string and allows for comparison to other version numbers.
Only numeric semantic version numbers are supported.
- If any part of the version number has a suffix then the suffix is ignored.
- If any part of the version number does not start with a digit then it is treated as zero value.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- compareTo() : mixed
- update() : mixed
- versionFromString() : mixed
- createVersionParts() : mixed
- Convert a version string to an array of integer parts for easier comparison.
Properties
$v
public
mixed
$v
$DELIM
private
static mixed
$DELIM
= '.'
$mP
private
mixed
$mP
$vP
private
mixed
$vP
Methods
__construct()
public
__construct(mixed $version[, mixed $maxParts = null ]) : mixed
Parameters
- $version : mixed
- $maxParts : mixed = null
compareTo()
public
compareTo(mixed $version) : mixed
Parameters
- $version : mixed
update()
public
update(mixed $maxParts) : mixed
Parameters
- $maxParts : mixed
versionFromString()
public
static versionFromString(mixed $versionString) : mixed
Parameters
- $versionString : mixed
createVersionParts()
Convert a version string to an array of integer parts for easier comparison.
private
createVersionParts() : mixed