Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Query

Fonctions membres publiques

 __construct ($options, DatabaseInterface $db=null)
 
 toUri ($base='')
 
 getExcludedTermIds ()
 
 getIncludedTermIds ()
 
 getRequiredTermIds ()
 

Champs de données

 $search
 
 $input
 
 $language
 
 $mode
 
 $included = array()
 
 $excluded = array()
 
 $ignored = array()
 
 $operators = array()
 
 $highlight = array()
 
 $terms
 
 $empty
 
 $filter
 
 $filters = array()
 
 $date1
 
 $date2
 
 $when1
 
 $when2
 
 $wordmode
 

Fonctions membres protégées

 processStaticTaxonomy ($filterId)
 
 processDynamicTaxonomy ($filters)
 
 processDates ($date1, $date2, $when1, $when2)
 
 processString ($input, $lang, $mode)
 
 getTokenData ($token)
 

Description détaillée

Query class for the Finder indexer package.

Depuis
2.5

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $options,
DatabaseInterface  $db = null 
)

Method to instantiate the query object.

Paramètres
array$optionsAn array of query options.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $db, $options, class, elseif, Factory\getContainer(), Helper\getDefaultLanguage(), language, null, et Joomla\Database\setDatabase().

Documentation des fonctions membres

◆ getExcludedTermIds()

getExcludedTermIds ( )

Method to get a list of excluded search term ids.

Renvoie
array An array of excluded term ids.
Depuis
2.5

Références $c, $i, $results, et ArrayHelper\toInteger().

◆ getIncludedTermIds()

getIncludedTermIds ( )

Method to get a list of included search term ids.

Renvoie
array An array of included term ids.
Depuis
2.5

Références $c, $i, $key, $results, $value, et ArrayHelper\toInteger().

◆ getRequiredTermIds()

getRequiredTermIds ( )

Method to get a list of required search term ids.

Renvoie
array An array of required term ids.
Depuis
2.5

Références $c, $i, $key, $results, $value, et ArrayHelper\toInteger().

◆ getTokenData()

getTokenData (   $token)
protected

Method to get the base and similar term ids and, if necessary, suggested term data from the database. The terms ids are identified based on a 'like' match in MySQL and/or a common stem. If no term ids could be found, then we know that we will not be able to return any results for that term and we should try to find a similar term to use that we can match so that we can suggest the alternative search query to the user.

Paramètres
Token$tokenA Token object.
Renvoie
Token A Token object.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $c, $db, $i, $key, $query, $results, elseif, Joomla\Database\getDatabase(), et ParameterType\STRING.

◆ processDates()

processDates (   $date1,
  $date2,
  $when1,
  $when2 
)
protected

Method to process the query date filters to determine start and end date limitations.

Paramètres
string$date1The first date filter.
string$date2The second date filter.
string$when1The first date modifier.
string$when2The second date modifier.
Renvoie
boolean True on success.
Depuis
2.5

Références $date, Joomla\Database\Query\$offset, Text\_(), Factory\getApplication(), Factory\getDate(), null, et StringHelper\strtolower().

◆ processDynamicTaxonomy()

processDynamicTaxonomy (   $filters)
protected

Method to process the dynamic taxonomy input. The dynamic taxonomy input comes in the form of select fields that the user chooses from. The dynamic taxonomy input is processed AFTER the static taxonomy input because the dynamic options can be used to further narrow a static taxonomy filter.

Paramètres
array$filtersAn array of taxonomy node ids.
Renvoie
boolean True on success.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $db, $filters, $groups, $query, $result, $results, Joomla\Database\getDatabase(), Factory\getUser(), et ArrayHelper\toInteger().

◆ processStaticTaxonomy()

processStaticTaxonomy (   $filterId)
protected

Method to process the static taxonomy input. The static taxonomy input comes in the form of a pre-defined search filter that is assigned to the search form.

Paramètres
integer$filterIdThe id of static filter.
Renvoie
boolean True on success, false on failure.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $db, $filters, $groups, $params, $query, $result, $results, $return, Joomla\Database\getDatabase(), Factory\getUser(), et ArrayHelper\toInteger().

◆ processString()

processString (   $input,
  $lang,
  $mode 
)
protected

Method to process the query input string and extract required, optional, and excluded tokens; taxonomy filters; and date filters.

Paramètres
string$inputThe query input string.
string$langThe query input language.
string$modeThe query matching mode.
Renvoie
boolean True on success.
Depuis
2.5
Exceptions
Exceptionon database error.

Références $c, $date, $i, $input, $key, $lang, $mode, $modifier, Joomla\Database\Query\$offset, $params, $parts, $return, $suffix, $value, Text\_(), LanguageHelper\branchSingular(), elseif, ENT_QUOTES, Factory\getApplication(), Taxonomy\getBranchTitles(), Factory\getDate(), Taxonomy\getNodeByTitle(), ComponentHelper\getParams(), JDEBUG, null, StringHelper\strlen(), StringHelper\strpos(), StringHelper\strtolower(), StringHelper\substr(), et Helper\tokenize().

◆ toUri()

toUri (   $base = '')

Method to convert the query object into a URI string.

Paramètres
string$baseThe base URI. [optional]
Renvoie
string The complete query URI.
Depuis
2.5

Références $base, $item, $query, $uri, Factory\getApplication(), Uri\getInstance(), RouteHelper\getItemid(), et null.

Documentation des champs

◆ $date1

$date1

◆ $date2

$date2

◆ $empty

$empty

◆ $excluded

$excluded = array()

◆ $filter

$filter

◆ $filters

$filters = array()

◆ $highlight

$highlight = array()

◆ $ignored

$ignored = array()

◆ $included

$included = array()

◆ $input

$input

◆ $language

◆ $mode

$mode

◆ $operators

$operators = array()

◆ $search

$search

◆ $terms

$terms

◆ $when1

$when1

◆ $when2

$when2

◆ $wordmode

$wordmode

La documentation de cette classe a été générée à partir du fichier suivant :