Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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.
 
 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.
 

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\NullTermsCollisionDetector, and Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector.

◆ 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\NullTermsCollisionDetector, and Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector.

◆ 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\NullTermsCollisionDetector, and Wikibase\Repo\Store\Sql\Terms\DatabaseTermsCollisionDetector.


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