CompilableMatcher extends Matcher
A {@see Matcher} that can render itself as an inlined PHP boolean expression, letting {@see CompiledMatcher} compile the whole matcher tree to a cached PHP file instead of evaluating it through {@see Matcher::matches()}.
Methods
- compile() : string
- Render this matcher as a PHP boolean expression operating on the attribute variable named by {@see Compilation::$subject} (e.g. '$a').
- matches() : bool
Methods
compile()
Render this matcher as a PHP boolean expression operating on the attribute variable named by {@see Compilation::$subject} (e.g. '$a').
public
compile(Compilation $compilation) : string
Parameters
- $compilation : Compilation
Tags
Return values
stringmatches()
public
matches(Attributes $attributes) : bool
Parameters
- $attributes : Attributes