Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Store\TermsCollisionDetector Interface Reference

Find collisions of term values with existing terms in store. More...

+ Inheritance diagram for Wikibase\Repo\Store\TermsCollisionDetector:

Public Member Functions

 detectLabelCollision (string $lang, string $label)
 Returns an entity id that collides with given label in given languages, 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...
 
 detectLabelsCollision (TermList $labels)
 Returns entity ids that collides with given labels in given languages. More...
 

Detailed Description

Find collisions of term values with existing terms in store.

Member Function Documentation

◆ detectLabelAndDescriptionCollision()

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.

Parameters
string$lang
string$label
string$description
Returns
EntityId|null

Implemented in Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector, and Wikibase\Repo\Store\NullTermsCollisionDetector.

◆ detectLabelCollision()

Wikibase\Repo\Store\TermsCollisionDetector::detectLabelCollision ( string  $lang,
string  $label 
)

Returns an entity id that collides with given label in given languages, if any.

Parameters
string$lang
string$label
Returns
EntityId|null

Implemented in Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector, and Wikibase\Repo\Store\NullTermsCollisionDetector.

◆ detectLabelsCollision()

Wikibase\Repo\Store\TermsCollisionDetector::detectLabelsCollision ( TermList  $labels)

Returns entity ids that collides with given labels in given languages.

Parameters
TermList$labels// example return array [ 'P1' => [ Term('en', 'label'), Term('de', 'label') ] ]
Returns
array

Implemented in Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector, and Wikibase\Repo\Store\NullTermsCollisionDetector.


The documentation for this interface was generated from the following file: