Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\EntityTitleLookup Interface Reference

Represents an arbitrary mapping from entity IDs to wiki page titles, with no further guarantees given. More...

+ Inheritance diagram for Wikibase\Lib\Store\EntityTitleLookup:

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.
 

Detailed Description

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.

Author
Daniel Kinzler

Member Function Documentation

◆ getTitleForId()

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.

Todo
change this to return a TitleValue
Parameters
EntityId$id
Returns
Title|null

Implemented in Wikibase\Client\DataAccess\ClientSiteLinkTitleLookup, Wikibase\Repo\Content\ContentHandlerEntityTitleLookup, and Wikibase\Repo\Store\TypeDispatchingEntityTitleStoreLookup.

◆ getTitlesForIds()

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

Parameters
EntityId[]$ids
Returns
(Title|null)[]

Implemented in Wikibase\Repo\Content\ContentHandlerEntityTitleLookup, and Wikibase\Repo\Store\TypeDispatchingEntityTitleStoreLookup.


The documentation for this interface was generated from the following file: