Documentation

Version
in package
uses Log

A version class

Table of Contents

Constants

CUT_IF_NULL  = 0x0
not implemented yet
CUT_MAINT  = 0x4
Cut maintenance part including patch
CUT_PATCH  = 0x2
Cut the patch part of the version
NUMERIC  = 0x1
Return only numbers, withoud leading 'v' nor puncuation
RAW  = 0x10
Version as is without formatting

Methods

__construct()  : void
Constructs a new Version Object from a `git describe` string
__toString()  : string
Returns the Version as string formated with CUT_PATCH
compare()  : mixed
not implemented yet
format()  : string
Return the Version as string formatted according to the $flags

Constants

CUT_IF_NULL

not implemented yet

public hex CUT_IF_NULL = 0x0

CUT_MAINT

Cut maintenance part including patch

public hex CUT_MAINT = 0x4

CUT_PATCH

Cut the patch part of the version

public hex CUT_PATCH = 0x2

NUMERIC

Return only numbers, withoud leading 'v' nor puncuation

public hex NUMERIC = 0x1

RAW

Version as is without formatting

public hex RAW = 0x10

Methods

__construct()

Constructs a new Version Object from a `git describe` string

public __construct(string $raw) : void
Parameters
$raw : string

the raw version string to be parsed

__toString()

Returns the Version as string formated with CUT_PATCH

public __toString() : string
Return values
string

format()

Return the Version as string formatted according to the $flags

public format([int $flags = null ]) : string
Parameters
$flags : int = null
Return values
string

        
On this page

Search results