CompilingMatcher
in package
Helper class to evaluate constraint by compiling and reusing the code to evaluate
Table of Contents
Properties
- $compiledCheckerCache : array<string|int, mixed>
- $enabled : bool
- $resultCache : array<string|int, mixed>
- $transOpInt : mixed
Methods
- 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(\Composer\Semver\Constraint\Constraint::OP_EQ => \Composer\Semver\Constraint\Constraint::STR_OP_EQ, \Composer\Semver\Constraint\Constraint::OP_LT => \Composer\Semver\Constraint\Constraint::STR_OP_LT, \Composer\Semver\Constraint\Constraint::OP_LE => \Composer\Semver\Constraint\Constraint::STR_OP_LE, \Composer\Semver\Constraint\Constraint::OP_GT => \Composer\Semver\Constraint\Constraint::STR_OP_GT, \Composer\Semver\Constraint\Constraint::OP_GE => \Composer\Semver\Constraint\Constraint::STR_OP_GE, \Composer\Semver\Constraint\Constraint::OP_NE => \Composer\Semver\Constraint\Constraint::STR_OP_NE)
Tags
Methods
clear()
Clears the memoization cache once you are done
public
static clear() : 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