Documentation

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
author

DeviceAtlas Limited

Table of Contents

Properties

$v  : mixed
$DELIM  : mixed
$mP  : mixed
$vP  : mixed

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

$DELIM

private static mixed $DELIM = '.'

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

        
On this page

Search results