Wikibase
MediaWiki Wikibase extension
|
API module to search for Wikibase entities. More...
Public Member Functions | |
__construct (ApiMain $mainModule, string $moduleName, EntitySearchHelper $entitySearchHelper, ContentLanguages $termLanguages, EntitySourceLookup $entitySourceLookup, EntityTitleTextLookup $entityTitleTextLookup, EntityUrlLookup $entityUrlLookup, EntityArticleIdLookup $entityArticleIdLookup, ApiErrorReporter $errorReporter, array $enabledEntityTypes) | |
execute () | |
executeInternal () | |
Static Public Member Functions | |
static | factory (ApiMain $mainModule, string $moduleName, ApiHelperFactory $apiHelperFactory, array $enabledEntityTypes, EntityArticleIdLookup $entityArticleIdLookup, EntitySearchHelper $entitySearchHelper, EntitySourceLookup $entitySourceLookup, EntityTitleTextLookup $entityTitleTextLookup, EntityUrlLookup $entityUrlLookup, ContentLanguages $termsLanguages) |
Protected Member Functions | |
getAllowedParams () | |
getExamplesMessages () | |
Private Member Functions | |
getSearchEntries (array $params) | |
Populates the search result returning the number of requested matches plus one additional item for being able to determine if there would be any more results. More... | |
buildTermSearchMatchEntry (TermSearchResult $match, ?array $props) | |
getRepositoryOrEntitySourceName (EntityId $entityId) | |
Private Attributes | |
$entitySearchHelper | |
$termsLanguages | |
$entitySourceLookup | |
$entityTitleTextLookup | |
$entityUrlLookup | |
$entityArticleIdLookup | |
$errorReporter | |
$enabledEntityTypes | |
API module to search for Wikibase entities.
Wikibase\Repo\Api\SearchEntities::__construct | ( | ApiMain | $mainModule, |
string | $moduleName, | ||
EntitySearchHelper | $entitySearchHelper, | ||
ContentLanguages | $termLanguages, | ||
EntitySourceLookup | $entitySourceLookup, | ||
EntityTitleTextLookup | $entityTitleTextLookup, | ||
EntityUrlLookup | $entityUrlLookup, | ||
EntityArticleIdLookup | $entityArticleIdLookup, | ||
ApiErrorReporter | $errorReporter, | ||
array | $enabledEntityTypes | ||
) |
|
private |
TermSearchResult | $match | |
string[] | null | $props |
The repository key should be deprecated and removed, for now avoid adding it when using federatedProperties to avoid confusion in the new feature and avoid the need to "fix" it.. This is deliberately not tested and thus not injected as for federated properties we "don't care much" and for default Wikibase this is already covered by the SearchEntitiesTest.
Add matched terms to the aliases key in the result to give some context for the matched Term if the matched term is different to the alias. XXX: This appears odd but is used in the UI / Entity suggesters
Wikibase\Repo\Api\SearchEntities::execute | ( | ) |
Wikibase\Repo\Api\SearchEntities::executeInternal | ( | ) |
|
static |
|
protected |
|
protected |
|
private |
|
private |
Populates the search result returning the number of requested matches plus one additional item for being able to determine if there would be any more results.
If there are not enough exact matches, the list of returned entries will be additionally filled with prefixed matches.
array | $params |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |