Wikibase
MediaWiki Wikibase extension
|
Queries db term store for collisions on terms. More...
Public Member Functions | |
__construct (string $entityType, ILoadBalancer $loadBalancer, TypeIdsLookup $typeIdsLookup) | |
detectLabelCollision (string $lang, string $label) | |
Returns an entity id that collides with given label in given language, if any. More... | |
detectLabelAndDescriptionCollision (string $lang, string $label, string $description) | |
Returns an entity id that collides with given label and description in given languages, if any. More... | |
Private Member Functions | |
makeEntityId ( $numericEntityId) | |
composeEntityId ( $numericEntityId) | |
findEntityIdsWithTermInLang ( $lang, string $text, int $termTypeId, bool $firstMatchOnly=false, array $filterOnEntityIds=[]) | |
getTermQueryParams ( $typeId, $lang, $text) | |
getDbr () | |
Private Attributes | |
$entityType | |
$loadBalancer | |
$typeIdsLookup | |
$databaseEntityTermsTableProvider | |
Queries db term store for collisions on terms.
Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector::__construct | ( | string | $entityType, |
ILoadBalancer | $loadBalancer, | ||
TypeIdsLookup | $typeIdsLookup | ||
) |
string | $entityType | one of the two supported types: Item::ENTITY_TYPE or Property::ENTITY_TYPE |
ILoadBalancer | $loadBalancer | |
TypeIdsLookup | $typeIdsLookup |
InvalidArgumentException | when non supported entity type is given |
|
private |
Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector::detectLabelAndDescriptionCollision | ( | string | $lang, |
string | $label, | ||
string | $description | ||
) |
Returns an entity id that collides with given label and description in given languages, if any.
string | $lang | |
string | $label | |
string | $description |
Implements Wikibase\Repo\Store\TermsCollisionDetector.
Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector::detectLabelCollision | ( | string | $lang, |
string | $label | ||
) |
Returns an entity id that collides with given label in given language, if any.
string | $lang | |
string | $label |
Implements Wikibase\Repo\Store\TermsCollisionDetector.
|
private |
|
private |
|
private |
|
private |
mixed | null | $numericEntityId |
|
private |
|
private |
|
private |
|
private |