CompilingMatcher
in package
Helper class to evaluate constraint by compiling and reusing the code to evaluate
Table of Contents
- $compiledCheckerCache : array<string|int, mixed>
- $enabled : bool
- $transOpInt : mixed
- match() : mixed
- Evaluates the expression: $constraint match $operator $version
Properties
$compiledCheckerCache
private
static array<string|int, mixed>
$compiledCheckerCache
= array()
Tags
$enabled
private
static bool
$enabled
$transOpInt
private
static mixed
$transOpInt
= array(ComposerSemverConstraintConstraint::OP_EQ => ComposerSemverConstraintConstraint::STR_OP_EQ, ComposerSemverConstraintConstraint::OP_LT => ComposerSemverConstraintConstraint::STR_OP_LT, ComposerSemverConstraintConstraint::OP_LE => ComposerSemverConstraintConstraint::STR_OP_LE, ComposerSemverConstraintConstraint::OP_GT => ComposerSemverConstraintConstraint::STR_OP_GT, ComposerSemverConstraintConstraint::OP_GE => ComposerSemverConstraintConstraint::STR_OP_GE, ComposerSemverConstraintConstraint::OP_NE => ComposerSemverConstraintConstraint::STR_OP_NE)
Tags
Methods
match()
Evaluates the expression: $constraint match $operator $version
public
static match(ConstraintInterface $constraint, int $operator, string $version) : mixed
Parameters
- $constraint : ConstraintInterface
- $operator : int
- $version : string