Wikibase
MediaWiki Wikibase extension
Wikibase\DataModel\Services\Lookup\EntityLookup Interface Reference

Service interface for retrieving Entities from storage. More...

+ Inheritance diagram for Wikibase\DataModel\Services\Lookup\EntityLookup:

Public Member Functions

 getEntity (EntityId $entityId)
 
 hasEntity (EntityId $entityId)
 Returns whether the given entity can bee looked up using getEntity(). More...
 

Detailed Description

Service interface for retrieving Entities from storage.

Since
1.1
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Daniel Kinzler

Member Function Documentation

◆ getEntity()

Wikibase\DataModel\Services\Lookup\EntityLookup::getEntity ( EntityId  $entityId)

◆ hasEntity()

Wikibase\DataModel\Services\Lookup\EntityLookup::hasEntity ( EntityId  $entityId)

Returns whether the given entity can bee looked up using getEntity().

This avoids loading and deserializing entity content just to check whether the entity exists.

Note
Implementations of this method may or may not resolve redirects. Code that needs control over redirect resolution should use an EntityRevisionLookup instead.
Since
1.1
Parameters
EntityId$entityId
Returns
bool
Exceptions
EntityLookupException

Implemented in Wikibase\DataModel\Services\Lookup\RestrictedEntityLookup, Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup, Wikibase\DataModel\Services\Lookup\InMemoryEntityLookup, Wikibase\DataModel\Services\Lookup\ExceptionIgnoringEntityLookup, Wikibase\DataModel\Services\Lookup\DispatchingEntityLookup, Wikibase\DataModel\Services\Lookup\DisabledEntityTypesEntityLookup, and Wikibase\Lib\Store\RevisionBasedEntityLookup.


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