QueryInterface
in
Common methods that must be shared by all query objects.
Tags
Table of Contents
- containsTerm() : bool
- Does the query contain the specified term? An optional normalizer can be provided to allow for fuzzier matching.
- getAllTerms() : string
- Get a concatenated list of all query strings within the object.
- replaceTerm() : void
- Replace a term.
Methods
containsTerm()
Does the query contain the specified term? An optional normalizer can be provided to allow for fuzzier matching.
public
containsTerm(string $needle[, callable $normalizer = null ]) : bool
Parameters
- $needle : string
-
Term to check
- $normalizer : callable = null
-
Function to normalize text strings (null for no normalization)
Return values
bool —getAllTerms()
Get a concatenated list of all query strings within the object.
public
getAllTerms() : string
Return values
string —replaceTerm()
Replace a term.
public
replaceTerm(string $from, string $to[, callable $normalizer = null ]) : void
Parameters
- $from : string
-
Search term to find
- $to : string
-
Search term to insert
- $normalizer : callable = null
-
Function to normalize text strings (null for no normalization)