Wikibase
MediaWiki Wikibase extension
|
Contains methods to lookup of sitelinks of lookup by sitelinks. More...
Public Member Functions | |
getItemIdForLink ( $globalSiteId, $pageTitle) | |
Returns the id of the item that is equivalent to the provided page, or null if there is none. | |
getLinks (array $numericIds=[], array $siteIds=[], array $pageNames=[]) | |
Returns the links that match the provided conditions. | |
getSiteLinksForItem (ItemId $itemId) | |
Returns an array of SiteLink objects for an item. | |
getItemIdForSiteLink (SiteLink $siteLink) | |
Contains methods to lookup of sitelinks of lookup by sitelinks.
Wikibase\Lib\Store\SiteLinkLookup::getItemIdForLink | ( | $globalSiteId, | |
$pageTitle | |||
) |
Returns the id of the item that is equivalent to the provided page, or null if there is none.
string | $globalSiteId | |
string | $pageTitle |
Implemented in Wikibase\Lib\Store\CachingSiteLinkLookup, Wikibase\Lib\Store\HashSiteLinkStore, and Wikibase\Lib\Store\Sql\SiteLinkTable.
Wikibase\Lib\Store\SiteLinkLookup::getItemIdForSiteLink | ( | SiteLink | $siteLink | ) |
SiteLink | $siteLink |
Implemented in Wikibase\Lib\Store\CachingSiteLinkLookup, Wikibase\Lib\Store\HashSiteLinkStore, and Wikibase\Lib\Store\Sql\SiteLinkTable.
Wikibase\Lib\Store\SiteLinkLookup::getLinks | ( | array | $numericIds = [] , |
array | $siteIds = [] , |
||
array | $pageNames = [] |
||
) |
Returns the links that match the provided conditions.
The links are returned as arrays with the following elements in specified order:
Note: if the conditions are not very selective the result set can be very big. Thus the caller is responsible for not executing too expensive queries in its context.
int[] | $numericIds | Numeric (unprefixed) item ids |
string[] | $siteIds | |
string[] | $pageNames |
Implemented in Wikibase\Lib\Store\CachingSiteLinkLookup, and Wikibase\Lib\Store\Sql\SiteLinkTable.
Wikibase\Lib\Store\SiteLinkLookup::getSiteLinksForItem | ( | ItemId | $itemId | ) |
Returns an array of SiteLink objects for an item.
If the item isn't known or not an Item, an empty array is returned.
ItemId | $itemId |
Implemented in Wikibase\Lib\Store\CachingSiteLinkLookup, Wikibase\Lib\Store\HashSiteLinkStore, and Wikibase\Lib\Store\Sql\SiteLinkTable.