Wikibase
MediaWiki Wikibase extension
|
Represents an arbitrary mapping from entity IDs to wiki page titles, with no further guarantees given. More...
Public Member Functions | |
getTitleForId (EntityId $id) | |
Returns the Title for the given entity. | |
getTitlesForIds (array $ids) | |
Returns an array of Titles for the given entity ids, indexed by the id serialization. | |
Represents an arbitrary mapping from entity IDs to wiki page titles, with no further guarantees given.
The resulting title does not necessarily represent the page that actually stores the entity contents.
The mapping could be programmatic, or it could be based on database lookups.
Wikibase\Lib\Store\EntityTitleLookup::getTitleForId | ( | EntityId | $id | ) |
Returns the Title for the given entity.
If the entity does not exist, this method will return either null, or a Title object referring to a page that does not exist.
EntityId | $id |
MWException | |
OutOfBoundsException | |
InvalidArgumentException |
Implemented in Wikibase\Client\DataAccess\ClientSiteLinkTitleLookup, Wikibase\Repo\Content\ContentHandlerEntityTitleLookup, and Wikibase\Repo\Store\TypeDispatchingEntityTitleStoreLookup.
Wikibase\Lib\Store\EntityTitleLookup::getTitlesForIds | ( | array | $ids | ) |
Returns an array of Titles for the given entity ids, indexed by the id serialization.
If an entity does not exist, the array element for the relevant id serialization will be null
EntityId[] | $ids |
MWException | |
OutOfBoundsException | |
InvalidArgumentException |
Implemented in Wikibase\Repo\Content\ContentHandlerEntityTitleLookup, and Wikibase\Repo\Store\TypeDispatchingEntityTitleStoreLookup.