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
- $resultCache : array<string|int, mixed>
- $transOpInt : mixed
- clear() : void
- Clears the memoization cache once you are done
- 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
$resultCache
private
static array<string|int, mixed>
$resultCache
= array()
Tags
$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
clear()
Clears the memoization cache once you are done
public
static clear() : void
Return values
void —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