VersionTools
in package
Table of Contents
Methods
- dropBuildId() : string
- Drop the build ID from a semantic version name.
- intVersionToSortableString() : string
- Transform int formatted version (from 5 or 6 integer) to a sortable string.
- qgisMajMinHumanVersion() : string
- Transform integer QGIS version major minor to the human name.
- qgisVersionWithNameToInt() : int
- Transform a QGIS version with its name to a sortable int version.
Methods
dropBuildId()
Drop the build ID from a semantic version name.
public
static dropBuildId(string $version) : string
For instance, 3.10.0-pre.8697 → 3.10.0-pre.
Parameters
- $version : string
-
The version to clean
Return values
string —The cleaned version
intVersionToSortableString()
Transform int formatted version (from 5 or 6 integer) to a sortable string.
public
static intVersionToSortableString(string $intVersion) : string
Transform "10102" into "01.01.02" Transform "050912" into "05.09.12"
Parameters
- $intVersion : string
-
the lizmap QGIS plugin version (not always int !!)
Return values
string —the version as sortable string
qgisMajMinHumanVersion()
Transform integer QGIS version major minor to the human name.
public
static qgisMajMinHumanVersion(mixed $qgisIntVersion) : string
For instance, 0340 → 3.40.
Parameters
- $qgisIntVersion : mixed
Return values
string —The cleaned version
qgisVersionWithNameToInt()
Transform a QGIS version with its name to a sortable int version.
public
static qgisVersionWithNameToInt(string $versionString) : int
Transform "3.34.12-Prizren" into "33412"
Parameters
- $versionString : string
-
Name of the version