Query
in package
Description of Query
Tags
Table of Contents
Constants
- STRICT_ALL = 'all'
- STRICT_ANY = 'any'
- STRICT_SHOULD = 'should'
Properties
- $cfg : object
- $limit : int
- $properties : array<string, mixed>
- $query : string
- $type : array<string|int, string>
- $typeStrict : string
Methods
- __construct() : mixed
- fromSuggest() : self
- getMatches() : array<int, mixed>
- getSuggestEntities() : array<int, mixed>
- computeScore() : float
- getBestLanguage() : string|null
- getOutputQuery() : QueryPart
- getTypeWhereClause() : string
Constants
STRICT_ALL
public
mixed
STRICT_ALL
= 'all'
STRICT_ANY
public
mixed
STRICT_ANY
= 'any'
STRICT_SHOULD
public
mixed
STRICT_SHOULD
= 'should'
Properties
$cfg
private
object
$cfg
$limit
private
int
$limit
= PHP_INT_MAX
$properties
private
array<string, mixed>
$properties
$query
private
string
$query
= ''
$type
private
array<string|int, string>
$type
= []
$typeStrict
private
string
$typeStrict
= self::STRICT_ALL
Methods
__construct()
public
__construct(array<string, mixed> $query, object $config) : mixed
Parameters
- $query : array<string, mixed>
- $config : object
fromSuggest()
public
static fromSuggest(string $prefix, object $config) : self
Parameters
- $prefix : string
- $config : object
Return values
selfgetMatches()
public
getMatches(PDO $pdo) : array<int, mixed>
Parameters
- $pdo : PDO
Return values
array<int, mixed>getSuggestEntities()
public
getSuggestEntities(PDO $pdo, int $offset) : array<int, mixed>
Parameters
- $pdo : PDO
- $offset : int
Return values
array<int, mixed>computeScore()
private
computeScore(array<string, mixed> $properties) : float
Parameters
- $properties : array<string, mixed>
Return values
floatgetBestLanguage()
private
getBestLanguage(array<string, string> $data) : string|null
Parameters
- $data : array<string, string>
Return values
string|nullgetOutputQuery()
private
getOutputQuery() : QueryPart
Return values
QueryPartgetTypeWhereClause()
private
getTypeWhereClause() : string