WorkKeysQuery
extends AbstractQuery
in package
A work keys query.
Tags
Table of Contents
- $id : string|null
- Record ID
- $includeSelf : bool
- Whether to include the record to compare with in the results
- $workKeys : array<string|int, mixed>
- Work keys
- __construct() : mixed
- Constructor.
- 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.
- getId() : string|null
- Return record id
- getIncludeSelf() : bool
- Return "include self" setting
- getWorkKeys() : array<string|int, mixed>
- Return work keys
- replaceTerm() : void
- Replace a term.
- setId() : void
- Set record id
- setIncludeSelf() : void
- Set "include self" setting
- setWorkKeys() : void
- Set work keys
Properties
$id
Record ID
protected
string|null
$id
$includeSelf
Whether to include the record to compare with in the results
protected
bool
$includeSelf
$workKeys
Work keys
protected
array<string|int, mixed>
$workKeys
Methods
__construct()
Constructor.
public
__construct(string|null $id, bool $includeSelf[, array<string|int, mixed> $workKeys = [] ]) : mixed
Parameters
- $id : string|null
-
Record ID
- $includeSelf : bool
-
Whether to include the record to compare with in the results
- $workKeys : array<string|int, mixed> = []
-
Work keys to use
Return values
mixed —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 —getId()
Return record id
public
getId() : string|null
Return values
string|null —getIncludeSelf()
Return "include self" setting
public
getIncludeSelf() : bool
Return values
bool —getWorkKeys()
Return work keys
public
getWorkKeys() : array<string|int, mixed>
Return values
array<string|int, mixed> —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)
Return values
void —setId()
Set record id
public
setId(string|null $id) : void
Parameters
- $id : string|null
-
Record id
Return values
void —setIncludeSelf()
Set "include self" setting
public
setIncludeSelf(bool $includeSelf) : void
Parameters
- $includeSelf : bool
-
New value
Return values
void —setWorkKeys()
Set work keys
public
setWorkKeys(array<string|int, mixed> $workKeys) : void
Parameters
- $workKeys : array<string|int, mixed>
-
Work keys