Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Store\CompositeSiteLinkConflictLookup Class Reference

A SiteLinkConflictLookup composing several others. More...

+ Inheritance diagram for Wikibase\Repo\Store\CompositeSiteLinkConflictLookup:
+ Collaboration diagram for Wikibase\Repo\Store\CompositeSiteLinkConflictLookup:

Public Member Functions

 __construct (array $lookups)
 
 getConflictsForItem (ItemId $itemId, SiteLinkList $siteLinkList, int $db=null)
 Returns an array with the conflicts between the item and the sitelinks currently in the store.
 

Private Attributes

 $lookups
 

Detailed Description

A SiteLinkConflictLookup composing several others.

Each conflict lookup is tried in turn, and as soon as one lookup returns a nonempty list of conflicts, that list is returned without trying the remaining lookups.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Store\CompositeSiteLinkConflictLookup::__construct ( array $lookups)
Parameters
SiteLinkConflictLookup[]$lookups

Member Function Documentation

◆ getConflictsForItem()

Wikibase\Repo\Store\CompositeSiteLinkConflictLookup::getConflictsForItem ( ItemId $item,
SiteLinkList $siteLinkList,
int $db = null )

Returns an array with the conflicts between the item and the sitelinks currently in the store.

The array is empty if there are no such conflicts.

The items in the return array are arrays with the following elements:

  • ItemId|null itemId (null if not known)
  • string siteId
  • string sitePage
Parameters
ItemId$item
SiteLinkList$siteLinkList
int | null$dbThe database flag to use (optional). Use one of DB_PRIMARY or DB_REPLICA. DB_PRIMARY can be used when you need the most recent data.
Returns
array[] An array of arrays, each with the keys "siteId", "itemId" and "sitePage".

Implements Wikibase\Repo\Store\SiteLinkConflictLookup.

Member Data Documentation

◆ $lookups

Wikibase\Repo\Store\CompositeSiteLinkConflictLookup::$lookups
private

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