Helper class to search for entities.
More...
|
| mergeSearchResults (array $searchResults, array $newSearchResults, $limit) |
|
| searchEntities ( $text, $languageCode, $entityType, $limit, $prefixSearch, $strictLanguage) |
| Wrapper around TermSearchInteractor::searchForEntities. More...
|
|
Helper class to search for entities.
- Copyright
- GPL-2.0-or-later
- Author
- Bene* < benes.nosp@m.tar..nosp@m.wikim.nosp@m.edia.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
◆ __construct()
- Parameters
-
ConfigurableTermSearchInteractor | $termSearchInteractor | |
◆ getRankedSearchResults()
Wikibase\Repo\Api\EntityTermSearchHelper::getRankedSearchResults |
( |
|
$text, |
|
|
|
$languageCode, |
|
|
|
$entityType, |
|
|
|
$limit, |
|
|
|
$strictLanguage |
|
) |
| |
Gets exact matches.
If there are not enough exact matches, it gets prefixed matches.
- Parameters
-
string | $text | |
string | $languageCode | |
string | $entityType | |
int | $limit | |
bool | $strictLanguage | |
- Returns
- TermSearchResult[] Key: string Serialized EntityId
Implements Wikibase\Repo\Api\EntitySearchHelper.
◆ mergeSearchResults()
Wikibase\Repo\Api\EntityTermSearchHelper::mergeSearchResults |
( |
array |
$searchResults, |
|
|
array |
$newSearchResults, |
|
|
|
$limit |
|
) |
| |
|
private |
- Parameters
-
TermSearchResult[] | $searchResults | |
TermSearchResult[] | $newSearchResults | |
int | $limit | |
- Returns
- TermSearchResult[]
◆ searchEntities()
Wikibase\Repo\Api\EntityTermSearchHelper::searchEntities |
( |
|
$text, |
|
|
|
$languageCode, |
|
|
|
$entityType, |
|
|
|
$limit, |
|
|
|
$prefixSearch, |
|
|
|
$strictLanguage |
|
) |
| |
|
private |
Wrapper around TermSearchInteractor::searchForEntities.
- See also
- TermSearchInteractor::searchForEntities
- Parameters
-
string | $text | |
string | $languageCode | |
string | $entityType | |
int | $limit | |
bool | $prefixSearch | |
bool | $strictLanguage | |
- Returns
- TermSearchResult[]
◆ $termSearchInteractor
Wikibase\Repo\Api\EntityTermSearchHelper::$termSearchInteractor |
|
private |
The documentation for this class was generated from the following file: