PageComparison::matches()

Given a Selectors object or a selector string, return whether this Page matches it

Usage

// basic usage
$bool = $pageComparison->matches(Page $page, $s);

// usage with all arguments
$bool = $pageComparison->matches(Page $page, $s, array $options = []);

Arguments

NameType(s)Description
$pagePage
$sstring array Selectors
$options (optional)array

Options to modify behavior 3.0.225+ only):

  • useDatabase (bool|null): Use database for matching rather than in-memory? Default:false

Return value

bool


PageComparison methods and properties

API reference based on ProcessWire core version 3.0.255