PHP Class Naneau\SemVer\Version

A single SemVer version
Inheritance: extends Naneau\SemVer\Version\Versionable
Afficher le fichier Open project: naneau/semver Class Usage Examples

Méthodes publiques

Méthode Description
__toString ( ) : string String representation of this Version
cleanCopy ( ) : Version Create a new Version that discards the entity information of build and originalVersionString
getBuild ( ) : Naneau\SemVer\Version\Build Get the build
getOriginalVersion ( ) : string Get the original version string
getPreRelease ( ) : Naneau\SemVer\Version\PreRelease Get the pre release version
hasBuild ( ) : boolean Does this Version have a Build?
hasPreRelease ( ) : boolean Does this Version have a pre release?
next ( Version | string | null $base = null ) : Version Get the next logical version relative to the provided base version. If no base is supplied, base will be the same as the current version.
setBuild ( Naneau\SemVer\Version\Build $build ) : Version Set the build
setOriginalVersion ( $version ) Set the original version string for later usage
setPreRelease ( Naneau\SemVer\Version\PreRelease $preRelease ) : Version Set the pre release version

Method Details

__toString() public méthode

String representation of this Version
public __toString ( ) : string
Résultat string

cleanCopy() public méthode

Create a new Version that discards the entity information of build and originalVersionString
public cleanCopy ( ) : Version
Résultat Version

getBuild() public méthode

Get the build
public getBuild ( ) : Naneau\SemVer\Version\Build
Résultat Naneau\SemVer\Version\Build

getOriginalVersion() public méthode

Get the original version string
public getOriginalVersion ( ) : string
Résultat string

getPreRelease() public méthode

Get the pre release version
public getPreRelease ( ) : Naneau\SemVer\Version\PreRelease
Résultat Naneau\SemVer\Version\PreRelease

hasBuild() public méthode

Does this Version have a Build?
public hasBuild ( ) : boolean
Résultat boolean

hasPreRelease() public méthode

Does this Version have a pre release?
public hasPreRelease ( ) : boolean
Résultat boolean

next() public méthode

Get the next logical version relative to the provided base version. If no base is supplied, base will be the same as the current version.
public next ( Version | string | null $base = null ) : Version
$base Version | string | null
Résultat Version

setBuild() public méthode

Set the build
public setBuild ( Naneau\SemVer\Version\Build $build ) : Version
$build Naneau\SemVer\Version\Build
Résultat Version

setOriginalVersion() public méthode

Set the original version string for later usage
public setOriginalVersion ( $version )
$version

setPreRelease() public méthode

Set the pre release version
public setPreRelease ( Naneau\SemVer\Version\PreRelease $preRelease ) : Version
$preRelease Naneau\SemVer\Version\PreRelease
Résultat Version