Represents a lookup database table for sitelinks.
More...
Represents a lookup database table for sitelinks.
It should have these fields: ips_item_id, ips_site_id, ips_site_page.
- Copyright
- GPL-2.0-or-later
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
-
Daniel Kinzler
◆ __construct()
Wikibase\Lib\Store\Sql\SiteLinkTable::__construct |
( |
|
$table, |
|
|
|
$readonly, |
|
|
|
$wiki = false |
|
) |
| |
- Parameters
-
string | $table | The table to use for the sitelinks |
bool | $readonly | Whether the table can be modified. |
string | bool | $wiki | The wiki's database to connect to. Must be a value LBFactory understands. Defaults to false, which is the local wiki. |
- Exceptions
-
◆ clear()
Wikibase\Lib\Store\Sql\SiteLinkTable::clear |
( |
| ) |
|
◆ deleteLinks()
Wikibase\Lib\Store\Sql\SiteLinkTable::deleteLinks |
( |
Item |
$item, |
|
|
array |
$links, |
|
|
IDatabase |
$dbw |
|
) |
| |
|
private |
- Parameters
-
Item | $item | |
SiteLink[] | $links | |
IDatabase | $dbw | |
- Returns
- bool Success indicator
◆ deleteLinksOfItem()
Wikibase\Lib\Store\Sql\SiteLinkTable::deleteLinksOfItem |
( |
ItemId |
$itemId | ) |
|
◆ diffSiteLinks()
Wikibase\Lib\Store\Sql\SiteLinkTable::diffSiteLinks |
( |
array |
$siteLinks1, |
|
|
array |
$siteLinks2 |
|
) |
| |
|
private |
- Parameters
-
SiteLink[] | $siteLinks1 | |
SiteLink[] | $siteLinks2 | |
- Returns
- SiteLink[]
◆ getEntityIdForLinkedTitle()
Wikibase\Lib\Store\Sql\SiteLinkTable::getEntityIdForLinkedTitle |
( |
|
$globalSiteId, |
|
|
|
$pageTitle |
|
) |
| |
◆ getItemIdForLink()
Wikibase\Lib\Store\Sql\SiteLinkTable::getItemIdForLink |
( |
|
$globalSiteId, |
|
|
|
$pageTitle |
|
) |
| |
- See also
- SiteLinkLookup::getItemIdForLink
- Todo:
- may want to deprecate this or change it to always return entity id object only
- Parameters
-
string | $globalSiteId | |
string | $pageTitle | |
- Exceptions
-
InvalidArgumentException | if a parameter does not have the expected type |
- Returns
- ItemId|null
Implements Wikibase\Lib\Store\SiteLinkLookup.
◆ getItemIdForSiteLink()
Wikibase\Lib\Store\Sql\SiteLinkTable::getItemIdForSiteLink |
( |
SiteLink |
$siteLink | ) |
|
◆ getLinks()
Wikibase\Lib\Store\Sql\SiteLinkTable::getLinks |
( |
array |
$numericIds = [] , |
|
|
array |
$siteIds = [] , |
|
|
array |
$pageNames = [] |
|
) |
| |
- See also
- SiteLinkLookup::getLinks
- Parameters
-
int[] | $numericIds | Numeric (unprefixed) item ids |
string[] | $siteIds | |
string[] | $pageNames | |
- Returns
- array[]
- Note
- The arrays returned by this method do not contain badges!
Implements Wikibase\Lib\Store\SiteLinkLookup.
◆ getSiteLinksForItem()
Wikibase\Lib\Store\Sql\SiteLinkTable::getSiteLinksForItem |
( |
ItemId |
$itemId | ) |
|
- See also
- SiteLinkLookup::getSiteLinksForItem
- Parameters
-
- Returns
- SiteLink[]
- Note
- The SiteLink objects returned by this method do not contain badges!
Implements Wikibase\Lib\Store\SiteLinkLookup.
◆ insertLinks()
Wikibase\Lib\Store\Sql\SiteLinkTable::insertLinks |
( |
Item |
$item, |
|
|
array |
$links, |
|
|
IDatabase |
$dbw |
|
) |
| |
|
private |
- Parameters
-
Item | $item | |
SiteLink[] | $links | |
IDatabase | $dbw | |
- Returns
- bool Success indicator
◆ saveLinksOfItem()
Wikibase\Lib\Store\Sql\SiteLinkTable::saveLinksOfItem |
( |
Item |
$item | ) |
|
◆ $logger
Wikibase\Lib\Store\Sql\SiteLinkTable::$logger |
|
private |
◆ $readonly
Wikibase\Lib\Store\Sql\SiteLinkTable::$readonly |
|
protected |
◆ $table
Wikibase\Lib\Store\Sql\SiteLinkTable::$table |
|
protected |
The documentation for this class was generated from the following file: