TYPO3
7.6
|
Static Public Member Functions | |
static | convertVersionNumberToInteger ($versionNumber) |
static | convertIntegerToVersionNumber ($versionInteger) |
static | splitVersionRange ($version) |
static | getNumericTypo3Version () |
static | getCurrentTypo3Version () |
static | convertVersionsStringToVersionNumbers ($versionsString) |
static | convertVersionStringToArray ($version) |
static | raiseVersionNumber ($raise, $version) |
Class with helper functions for version number handling
Definition at line 20 of file VersionNumberUtility.php.
|
static |
Returns the three part version number (string) from an integer, eg 4012003 -> '4.12.3'
int | $versionInteger | Integer representation of version number |
\InvalidArgumentException | if $versionInteger is not an integer |
Definition at line 41 of file VersionNumberUtility.php.
|
static |
Returns an integer from a three part version number, eg '4.12.3' -> 4012003
string | $versionNumber | Version number on format x.x.x |
Definition at line 28 of file VersionNumberUtility.php.
Referenced by GeneralUtility\compat_version(), ListUtility\getExtensionTerData(), DependencyUtility\getLowestAndHighestIntegerVersions(), UpgradeWizard\getUpdateObjectInstance(), and Typo3DependencyViewHelper\isVersionSuitable().
|
static |
This function converts version range strings (like '4.2.0-4.4.99') to an array (like array('4.2.0', '4.4.99'). It also forces each version part to be between 0 and 999
string | $versionsString |
Definition at line 119 of file VersionNumberUtility.php.
References MathUtility\forceIntegerInRange(), and GeneralUtility\trimExplode().
|
static |
Parses the version number x.x.x and returns an array with the various parts. It also forces each … 0 to 999
string | $version | Version code, x.x.x |
Definition at line 145 of file VersionNumberUtility.php.
References MathUtility\forceIntegerInRange(), and GeneralUtility\intExplode().
|
static |
Wrapper function for TYPO3_version constant to make functions using the constant unit testable
Definition at line 106 of file VersionNumberUtility.php.
Referenced by CoreVersionService\getInstalledVersion().
|
static |
Removes -dev -alpha -beta -RC states (also without '-' prefix) from a version number and replaces them by .0 and normalizes to a three part version number
Definition at line 89 of file VersionNumberUtility.php.
References MathUtility\forceIntegerInRange(), and GeneralUtility\intExplode().
Referenced by DependencyUtility\checkTypo3Dependency(), and Typo3DependencyViewHelper\isVersionSuitable().
|
static |
Method to raise a version number
string | $raise | one of "main", "sub", "dev" - the version part to raise by one |
string | $version | (like 4.1.20) |
\TYPO3\CMS\Core\Exception |
Definition at line 168 of file VersionNumberUtility.php.
References MathUtility\forceIntegerInRange(), and GeneralUtility\intExplode().
|
static |
Splits a version range into an array.
If a single version number is given, it is considered a minimum value. If a dash is found, the numbers left and right are considered as minimum and maximum. Empty values are allowed. If no version can be parsed "0.0.0" — "0.0.0" is the result
string | $version | A string with a version range. |
Definition at line 65 of file VersionNumberUtility.php.