An array based dummy implementation of a SiteLinkStore for exclusive use in tests.
More...
An array based dummy implementation of a SiteLinkStore for exclusive use in tests.
- Todo
- Should be moved to the tests folder and namespace.
- Copyright
- GPL-2.0-or-later
- Author
- Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
◆ deleteLinksOfItem()
| Wikibase\Lib\Store\HashSiteLinkStore::deleteLinksOfItem |
( |
ItemId | $itemId | ) |
|
◆ getEntityIdForLinkedTitle()
| Wikibase\Lib\Store\HashSiteLinkStore::getEntityIdForLinkedTitle |
( |
| $globalSiteId, |
|
|
| $pageTitle ) |
◆ getItemIdForLink()
| Wikibase\Lib\Store\HashSiteLinkStore::getItemIdForLink |
( |
string | $globalSiteId, |
|
|
string | $pageTitle ) |
- See also
- SiteLinkStore::getItemIdForLink
- 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\HashSiteLinkStore::getItemIdForSiteLink |
( |
SiteLink | $siteLink | ) |
|
◆ getSiteLinksForItem()
| Wikibase\Lib\Store\HashSiteLinkStore::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.
- Parameters
-
- Returns
- SiteLink[]
Implements Wikibase\Lib\Store\SiteLinkLookup.
◆ indexByItemId()
| Wikibase\Lib\Store\HashSiteLinkStore::indexByItemId |
( |
ItemId | $itemId, |
|
|
SiteLink | $siteLink ) |
|
private |
◆ indexByLink()
| Wikibase\Lib\Store\HashSiteLinkStore::indexByLink |
( |
ItemId | $itemId, |
|
|
SiteLink | $siteLink ) |
|
private |
◆ linkMatches()
| Wikibase\Lib\Store\HashSiteLinkStore::linkMatches |
( |
ItemId | $itemId, |
|
|
SiteLink | $siteLink, |
|
|
?array | $numericIds, |
|
|
?array | $siteIds, |
|
|
?array | $pageNames ) |
|
private |
Returns true if the link matches the given conditions.
- Parameters
-
| ItemId | $itemId | |
| SiteLink | $siteLink | |
| int[] | null | $numericIds | like for SiteLinkLookup::getLinks() |
| string[] | null | $siteIds | like for SiteLinkLookup::getLinks() |
| string[] | null | $pageNames | like for SiteLinkLookup::getLinks() |
- Returns
- bool
◆ makeSiteLinkKey()
| Wikibase\Lib\Store\HashSiteLinkStore::makeSiteLinkKey |
( |
SiteLink | $siteLink | ) |
|
|
private |
◆ saveLinksOfItem()
| Wikibase\Lib\Store\HashSiteLinkStore::saveLinksOfItem |
( |
Item | $item | ) |
|
◆ $itemIdsByLink
| Wikibase\Lib\Store\HashSiteLinkStore::$itemIdsByLink = [] |
|
private |
◆ $linksByItemId
| Wikibase\Lib\Store\HashSiteLinkStore::$linksByItemId = [] |
|
private |
The documentation for this class was generated from the following file: