SemverUtil
API reference › Foxy › Converter › SemverUtil
Normalizes asset-manager semantic versions for Composer.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
convertDateVersion() static | Converts the date or datetime version. | SemverUtil |
convertVersionMetadata() static | Converts prerelease and build metadata to Composer’s normalized stability notation. | SemverUtil |
createPattern() static | Creates a pattern with the version prefix pattern. | SemverUtil |
Method details
Section titled “Method details”convertDateVersion()
Section titled “convertDateVersion() ”public static function convertDateVersion(string $version): stringConverts the date or datetime version.
Parameters
| Parameter | Type | Description |
|---|---|---|
$version | string | The version. |
Returns
string
convertVersionMetadata()
Section titled “convertVersionMetadata() ”public static function convertVersionMetadata(string $version): stringConverts prerelease and build metadata to Composer’s normalized stability notation.
Parameters
| Parameter | Type | Description |
|---|---|---|
$version | string |
Returns
string
createPattern()
Section titled “createPattern() ”public static function createPattern(string $pattern): stringCreates a pattern with the version prefix pattern.
Parameters
| Parameter | Type | Description |
|---|---|---|
$pattern | string | The pattern without ’/’. |
Returns
string: The full pattern with ’/’.