interface ConstraintInterface

Class ContraintInterface

Methods

string
normalize($version, $strict = false)

Normalize a version number in a version that will be used in version_compare

bool
test( string $version, bool $strict = false)

Test if the version number is valid

Details

at line 28
string normalize($version, $strict = false)

Normalize a version number in a version that will be used in version_compare

Parameters

$version
$strict

Return Value

string the normalized expression

at line 37
bool test( string $version, bool $strict = false)

Test if the version number is valid

Parameters

string $version the version number
bool $strict if false precision will be normalized. eg: 2.1.0 > 2.1 will become 2.1.0 > 2.1.0 (default false)

Return Value

bool true if the version is equal, otherwise false