Wikibase
MediaWiki Wikibase extension
|
Find collisions of term values with existing terms in store. More...
Public Member Functions | |
detectLabelCollision (string $lang, string $label) | |
Returns an entity id that collides with given label in given languages, 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 $labels) | |
Returns entity ids that collides with given labels in given languages. | |
Find collisions of term values with existing terms in store.
Wikibase\Repo\Store\TermsCollisionDetector::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 |
Implemented in Wikibase\Repo\Store\NullTermsCollisionDetector, and Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector.
Wikibase\Repo\Store\TermsCollisionDetector::detectLabelCollision | ( | string | $lang, |
string | $label ) |
Returns an entity id that collides with given label in given languages, if any.
string | $lang | |
string | $label |
Implemented in Wikibase\Repo\Store\NullTermsCollisionDetector, and Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector.
Wikibase\Repo\Store\TermsCollisionDetector::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') ] ]
Implemented in Wikibase\Repo\Store\NullTermsCollisionDetector, and Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector.