\rex_version

Summary

Methods
Properties
Constants
isUnstable()
split()
compare()
gitHash()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

isUnstable()

isUnstable(string  $version) : bool

Parameters

string $version

Returns

bool —

split()

split(string  $version) : array

Splits a version string into its parts.

Parameters

string $version

Returns

array —

compare()

compare(string  $version1, string  $version2, string  $comparator = null) : int|bool

Compares two version number strings.

In contrast to version_compare() it treats "1.0" and "1.0.0" as equal and it supports a space as separator for the version parts, e.g. "1.0 beta1"

Parameters

string $version1

First version number

string $version2

Second version number

string $comparator

Optional comparator

Returns

int|bool —

gitHash()

gitHash(string  $path, null|string  $repo = null) : ?string

Returns the current git version hash for the given path.

Parameters

string $path

A local filesystem path

null|string $repo

If given, the version hash is returned only if the remote repository matches the given github repo (e.g. redaxo/redaxo)

Returns

?string —