Wikibase
MediaWiki Wikibase extension
|
Queries db term store for collisions on terms. More...
Public Member Functions | |
__construct (string $entityType, TermsDomainDb $db) | |
detectLabelCollision (string $lang, string $label) | |
Returns an entity id that collides with given label in given language, if any. | |
detectLabelAndDescriptionCollision (string $lang, string $label, string $description) | |
Returns an entity id that collides with given label and description in given languages, if any. | |
detectLabelsCollision (TermList $termList) | |
Returns entity ids that collides with given labels in given languages. | |
Private Member Functions | |
makeEntityId ( $numericEntityId) | |
composeEntityId ( $numericEntityId) | |
findEntityIdsWithTermInLang (string $lang, string $text, int $termTypeId, bool $firstMatchOnly=false, array $filterOnEntityIds=[]) | |
findEntityIdsWithTermsInLangs (array $lang, array $text, int $termTypeId) | |
newSelectQueryBuilder () | |
Private Attributes | |
string | $entityType |
TermsDomainDb | $db |
Queries db term store for collisions on terms.
Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector::__construct | ( | string | $entityType, |
TermsDomainDb | $db ) |
string | $entityType | one of the two supported types: Item::ENTITY_TYPE or Property::ENTITY_TYPE |
TermsDomainDb | $db |
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.
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.
Implements Wikibase\Repo\Store\TermsCollisionDetector.
Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector::detectLabelsCollision | ( | TermList | $labels | ) |
Returns entity ids that collides with given labels in given languages.
TermList | $labels |
// example return array [ 'P1' => [ Term('en', 'label'), Term('de', 'label') ] ]
Implements Wikibase\Repo\Store\TermsCollisionDetector.
|
private |
|
private |
|
private |
mixed | null | $numericEntityId |
|
private |
|
private |
|
private |