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. More... | |
getLinks (?array $numericIds=null, ?array $siteIds=null, ?array $pageNames=null) | |
Returns the links that match the provided conditions. More... | |
getSiteLinksForItem (ItemId $itemId) | |
Returns an array of SiteLink objects for an item. More... | |
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\Sql\SiteLinkTable, Wikibase\Lib\Store\HashSiteLinkStore, and Wikibase\Lib\Store\CachingSiteLinkLookup.
Wikibase\Lib\Store\SiteLinkLookup::getItemIdForSiteLink | ( | SiteLink | $siteLink | ) |
SiteLink | $siteLink |
Implemented in Wikibase\Lib\Store\Sql\SiteLinkTable, Wikibase\Lib\Store\HashSiteLinkStore, and Wikibase\Lib\Store\CachingSiteLinkLookup.
Wikibase\Lib\Store\SiteLinkLookup::getLinks | ( | ?array | $numericIds = null , |
?array | $siteIds = null , |
||
?array | $pageNames = null |
||
) |
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[] | null | $numericIds | Numeric (unprefixed) item ids, or null for no item filtering |
string[] | null | $siteIds | Site IDs, or null for no site filtering |
string[] | null | $pageNames | Page names, or null for no page filtering |
Implemented in Wikibase\Lib\Store\Sql\SiteLinkTable, and Wikibase\Lib\Store\CachingSiteLinkLookup.
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\Sql\SiteLinkTable, Wikibase\Lib\Store\HashSiteLinkStore, and Wikibase\Lib\Store\CachingSiteLinkLookup.