Flow PHP

CompiledMatcher

FinalYes

Builds the closure that an {@see AttributeFilter} uses to evaluate its matcher.

Methods

build()  : callable(Attributes): bool
Build the closure that evaluates the matcher against a single attribute set.

Methods

build()

Build the closure that evaluates the matcher against a single attribute set.

public static build(Matcher $matcher, string|null $cacheDir[, int $cacheDirPermissions = 0700 ]) : callable(Attributes): bool

The closure reports the raw match only - polarity (AttributeFilter::$exclude) and combination across multiple sources are applied by AttributeFilter, so the compiled expression (and its cache file) is independent of both.

Parameters
$matcher : Matcher
$cacheDir : string|null
$cacheDirPermissions : int = 0700

mode for the cache directory when it is created (octal, subject to umask)

Return values
callable(Attributes): bool

true when the matcher matches

On this page

Search results