Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\LabelConflictFinder Interface Reference

Service interface for detecting label conflicts. More...

Public Member Functions

 getLabelConflicts ( $entityType, array $labels, array $aliases=null)
 Returns a list of Terms that conflict with (that is, match) the given labels.
 
 getLabelWithDescriptionConflicts ( $entityType, array $labels, array $descriptions)
 Returns a list of Terms that conflict with (that is, match) the given labels and descriptions.
 

Detailed Description

Service interface for detecting label conflicts.

Deprecated:
Conflict detection for new term storage is done in ChangeOps
Author
Daniel Kinzler

Member Function Documentation

◆ getLabelConflicts()

Wikibase\Lib\Store\LabelConflictFinder::getLabelConflicts (   $entityType,
array  $labels,
array  $aliases = null 
)

Returns a list of Terms that conflict with (that is, match) the given labels.

Conflicts are defined to be inside on type of entity and language. If $aliases is not null (but possibly empty), conflicts between aliases and labels are also considered.

Deprecated:
Conflict detection for new term storage is done in ChangeOps
Note
implementations must return some conflicts if there are any conflicts, but are not required to return all conflicts.
Parameters
string$entityTypeThe entity type to consider for conflicts.
string[]$labelsThe labels to look for, with language codes as keys.
array[] | null$aliasesThe aliases to look for, with language codes as keys. If null, conflicts with aliases are not considered.
Returns
TermIndexEntry[]

◆ getLabelWithDescriptionConflicts()

Wikibase\Lib\Store\LabelConflictFinder::getLabelWithDescriptionConflicts (   $entityType,
array  $labels,
array  $descriptions 
)

Returns a list of Terms that conflict with (that is, match) the given labels and descriptions.

Conflicts are defined to be inside on type of entity and one language. For a label to be considered a conflict, there must be a conflicting description on the same entity. From this it follows that labels with no corresponding description cannot contribute to a conflicts.

Deprecated:
Conflict detection for new term storage is done in ChangeOps
Note
implementations must return some conflicts if there are any conflicts, but are not required to return all conflicts.
Parameters
string | null$entityTypeThe relevant entity type
string[]$labelsThe labels to look for, with language codes as keys.
string[]$descriptionsThe descriptions to consider (if desired), with language codes as keys.
Returns
TermIndexEntry[]

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