PHP Class Components_Helper_Version, horde

Show file Open project: horde/horde Class Usage Examples

Public Methods

Method Description
nextPearVersion ( string $version ) : string Increments the last part of a version number by one.
nextVersion ( string $version ) : string Increments the last part of a version number by one.
parsePearVersion ( string $version ) : object Converts the PEAR package version number to descriptive information.
pearToHordeWithBranch ( string $version, string $branch ) : string Convert the PEAR package version number to Horde style and take the branch name into account.
pearToTicketDescription ( string $version ) : string Converts the PEAR package version number to a descriptive tag used on bugs.horde.org.
validateApiStability ( string $version, string $stability ) Validates the version and api stability tuple.
validatePear ( string $version ) : string Validates and normalizes a version to be a valid PEAR version.
validateReleaseStability ( string $version, string $stability ) Validates the version and release stability tuple.

Method Details

nextPearVersion() public static method

Only increments if the old version is a stable version. Increments the release state suffix instead otherwise.
public static nextPearVersion ( string $version ) : string
$version string A version number.
return string The incremented version number.

nextVersion() public static method

Also attaches -git suffix and increments only if the old version is a stable version.
public static nextVersion ( string $version ) : string
$version string A version number.
return string The incremented version number.

parsePearVersion() public static method

1.1.0RC2 would become: { version: '1.1.0', description: 'Release Candidate', subversion: '2' }
public static parsePearVersion ( string $version ) : object
$version string The PEAR package version.
return object An object with the properties: - version: The base version string. - description: A stability description. - subversion: The sub version within the stability level.

pearToHordeWithBranch() public static method

Convert the PEAR package version number to Horde style and take the branch name into account.
public static pearToHordeWithBranch ( string $version, string $branch ) : string
$version string The PEAR package version.
$branch string The Horde branch name.
return string The Horde style version.

pearToTicketDescription() public static method

Converts the PEAR package version number to a descriptive tag used on bugs.horde.org.
public static pearToTicketDescription ( string $version ) : string
$version string The PEAR package version.
return string The description for bugs.horde.org.

validateApiStability() public static method

Validates the version and api stability tuple.
public static validateApiStability ( string $version, string $stability )
$version string A version string.
$stability string Api stability information.

validatePear() public static method

Validates and normalizes a version to be a valid PEAR version.
public static validatePear ( string $version ) : string
$version string A version string.
return string The normalized version string.

validateReleaseStability() public static method

Validates the version and release stability tuple.
public static validateReleaseStability ( string $version, string $stability )
$version string A version string.
$stability string Release stability information.