Wikibase
MediaWiki Wikibase extension
|
Helper class to search for entities via an api from another wikibase instance. More...
Public Member Functions | |
__construct (GenericActionApiClient $api, array $enabledDataTypes) | |
getRankedSearchResults ( $text, $languageCode, $entityType, $limit, $strictLanguage) | |
Get entities matching the search term. More... | |
Public Attributes | |
const | API_SEARCH_MULTIPLIER = 2 |
Private Member Functions | |
filterRequest (array $jsonResult, int $limit) | |
makeRequest (string $text, string $languageCode, string $entityType, int $limit, bool $strictLanguage) | |
getMatchedTerm (array $match) | |
Private Attributes | |
$api | |
$typesEnabled = [] | |
Helper class to search for entities via an api from another wikibase instance.
Wikibase\Repo\FederatedProperties\ApiEntitySearchHelper::__construct | ( | GenericActionApiClient | $api, |
array | $enabledDataTypes | ||
) |
GenericActionApiClient | $api | |
string[] | $enabledDataTypes |
|
private |
|
private |
Wikibase\Repo\FederatedProperties\ApiEntitySearchHelper::getRankedSearchResults | ( | $text, | |
$languageCode, | |||
$entityType, | |||
$limit, | |||
$strictLanguage | |||
) |
Get entities matching the search term.
string | $text | |
string | $languageCode | |
string | $entityType | |
int | $limit | |
bool | $strictLanguage |
InvalidArgumentException |
Implements Wikibase\Repo\Api\EntitySearchHelper.
|
private |
string | $text | |
string | $languageCode | |
string | $entityType | |
int | $limit | |
bool | $strictLanguage |
ApiRequestException |
|
private |
|
private |
const Wikibase\Repo\FederatedProperties\ApiEntitySearchHelper::API_SEARCH_MULTIPLIER = 2 |