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, ApiEntitySource $entitySource) | |
getRankedSearchResults ( $text, $languageCode, $entityType, $limit, $strictLanguage, ?string $profileContext) | |
Get entities matching the search term. | |
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 = [] | |
$entitySource | |
Helper class to search for entities via an api from another wikibase instance.
Wikibase\Repo\FederatedProperties\ApiEntitySearchHelper::__construct | ( | GenericActionApiClient | $api, |
array | $enabledDataTypes, | ||
ApiEntitySource | $entitySource ) |
GenericActionApiClient | $api | |
string[] | $enabledDataTypes |
|
private |
array | $jsonResult | |
int | $limit |
FederatedPropertiesException |
|
private |
Wikibase\Repo\FederatedProperties\ApiEntitySearchHelper::getRankedSearchResults | ( | $text, | |
$languageCode, | |||
$entityType, | |||
$limit, | |||
$strictLanguage, | |||
?string | $profileContext ) |
Get entities matching the search term.
string | $text | |
string | $languageCode | |
string | $entityType | |
int | $limit | |
bool | $strictLanguage | |
string | null | $profileContext |
InvalidArgumentException |
Implements Wikibase\Repo\Api\EntitySearchHelper.
|
private |
string | $text | |
string | $languageCode | |
string | $entityType | |
int | $limit | |
bool | $strictLanguage |
ApiRequestException |
|
private |
|
private |
|
private |
const Wikibase\Repo\FederatedProperties\ApiEntitySearchHelper::API_SEARCH_MULTIPLIER = 2 |