PHP Класс Airship\Engine\Continuum\Version

This contains the version comparison logic.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$currentVersion string

Открытые методы

Метод Описание
__construct ( string $currentVersion ) Version constructor.
getGroup ( integer $value, integer $group = self::GROUP_INCREMENT ) : integer Get the value within a group (i.e. 1.0.3 => 1000300)
getUpgrade ( integer $type = self::GROUP_PATCH ) : string Get the expected next version, based on upgrade type.
isMajorUpgrade ( string $nextVersion ) : boolean Is this a major upgrade? (Semantic versioning)
isMinorUpgrade ( string $nextVersion ) : boolean Is this a minor upgrade? (Semantic versioning)
isPatchUpgrade ( string $nextVersion ) : boolean Is this a patch upgrade? (Semantic versioning)
isUpgrade ( string $nextVersion ) : boolean Is $nextVersion newer than $this->currentVersion?

Описание методов

__construct() публичный Метод

Version constructor.
public __construct ( string $currentVersion )
$currentVersion string

getGroup() публичный статический Метод

Get the value within a group (i.e. 1.0.3 => 1000300)
public static getGroup ( integer $value, integer $group = self::GROUP_INCREMENT ) : integer
$value integer An expanded version
$group integer
Результат integer

getUpgrade() публичный Метод

From '1.4.11': (self::GROUP_PATCH) -> '1.4.12' (self::GROUP_MINOR) -> '1.5.0' (self::GROUP_MAJOR) -> '2.0.0'
public getUpgrade ( integer $type = self::GROUP_PATCH ) : string
$type integer
Результат string

isMajorUpgrade() публичный Метод

Is this a major upgrade? (Semantic versioning)
public isMajorUpgrade ( string $nextVersion ) : boolean
$nextVersion string
Результат boolean

isMinorUpgrade() публичный Метод

Is this a minor upgrade? (Semantic versioning)
public isMinorUpgrade ( string $nextVersion ) : boolean
$nextVersion string
Результат boolean

isPatchUpgrade() публичный Метод

Is this a patch upgrade? (Semantic versioning)
public isPatchUpgrade ( string $nextVersion ) : boolean
$nextVersion string
Результат boolean

isUpgrade() публичный Метод

Is $nextVersion newer than $this->currentVersion?
public isUpgrade ( string $nextVersion ) : boolean
$nextVersion string
Результат boolean

Описание свойств

$currentVersion защищенное свойство

protected string $currentVersion
Результат string