Wikibase
MediaWiki Wikibase extension
|
EntitySearchHelper decorator that adds an entity concept URI to the TermSearchResult meta data if not already set. More...
Public Member Functions | |
__construct (EntitySearchHelper $searchHelper, EntitySourceDefinitions $entitySourceDefinitions) | |
getRankedSearchResults ( $text, $languageCode, $entityType, $limit, $strictLanguage) | |
Get entities matching the search term. | |
Public Attributes | |
const | CONCEPTURI_META_DATA_KEY = TermSearchResult::CONCEPTURI_META_DATA_KEY |
Private Member Functions | |
getConceptUri (EntityId $entityId) | |
getConceptBaseUri (EntityId $entityId) | |
Private Attributes | |
$searchHelper | |
$entitySourceDefinitions | |
EntitySearchHelper decorator that adds an entity concept URI to the TermSearchResult meta data if not already set.
This works in conjunction with ApiEntitySearchHelper for federated properties that already includes the concept URI in the metadata.
Wikibase\Repo\Api\ConceptUriSearchHelper::__construct | ( | EntitySearchHelper | $searchHelper, |
EntitySourceDefinitions | $entitySourceDefinitions | ||
) |
|
private |
EntityId | $entityId |
LogicException | when there is no base URI for the repository $entityId belongs to |
|
private |
EntityId | $entityId |
Wikibase\Repo\Api\ConceptUriSearchHelper::getRankedSearchResults | ( | $text, | |
$languageCode, | |||
$entityType, | |||
$limit, | |||
$strictLanguage | |||
) |
Get entities matching the search term.
string | $text | |
string | $languageCode | |
string | $entityType | |
int | $limit | |
bool | $strictLanguage |
Implements Wikibase\Repo\Api\EntitySearchHelper.
|
private |
|
private |
const Wikibase\Repo\Api\ConceptUriSearchHelper::CONCEPTURI_META_DATA_KEY = TermSearchResult::CONCEPTURI_META_DATA_KEY |