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

Service interface for looking up EntityIds given local wiki pages. More...

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

Public Member Functions

 getEntityIds (array $titles)
 Returns the list of EntityIds of the entities associated with the given page titles.
 
 getEntityIdForTitle (Title $title)
 Returns the ID of the entity stored on the page identified by $title.
 

Detailed Description

Service interface for looking up EntityIds given local wiki pages.

Author
Daniel Kinzler

Member Function Documentation

◆ getEntityIdForTitle()

Wikibase\Lib\Store\EntityIdLookup::getEntityIdForTitle ( Title  $title)

Returns the ID of the entity stored on the page identified by $title.

Note
There is no guarantee that the EntityId returned by this method refers to an existing entity.
Parameters
Title$title
Todo:
Switch this to using TitleValue once we can easily get the content model and handler based on a TitleValue.
Returns
EntityId|null

Implemented in Wikibase\Client\Store\Sql\PagePropsEntityIdLookup, Wikibase\DataAccess\ByTypeDispatchingEntityIdLookup, and Wikibase\Repo\Content\EntityContentFactory.

◆ getEntityIds()

Wikibase\Lib\Store\EntityIdLookup::getEntityIds ( array  $titles)

Returns the list of EntityIds of the entities associated with the given page titles.

The resulting array uses the page IDs as keys.

Implementations may omit non-existing entities from the result. If they are included, they should have negative array keys.

Parameters
Title[]$titles
Exceptions
StorageException
Returns
EntityId[] Entity IDs, keyed by page IDs.

Implemented in Wikibase\Client\Store\Sql\PagePropsEntityIdLookup, Wikibase\DataAccess\ByTypeDispatchingEntityIdLookup, and Wikibase\Repo\Content\EntityContentFactory.


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