\QuickApps\Core\Package\RuleConstraint

Provides match() method.

Summary

Methods
Properties
Constants
match()
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

match()

match(string $version, string $constraints) : boolean

Check whether a version matches the given constraint.

Example:

Constraint::match('1.2.6', '>=1.1'); // returns true

Parameters

string $version

The version to check against (e.g. v4.2.6)

string $constraints

A string representing a dependency constraints, for instance, >7.0 || 1.2

Returns

boolean —

True if compatible, false otherwise