Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup Class Reference

An EntityRevisionLookup that does dispatching based on the entity type. More...

+ Inheritance diagram for Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup:
+ Collaboration diagram for Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup:

Public Member Functions

 __construct (array $callbacks, EntityRevisionLookup $defaultLookup)
 
 getEntityRevision (EntityId $entityId, $revisionId=0, $mode=LookupConstants::LATEST_FROM_REPLICA)
 
 getLatestRevisionId (EntityId $entityId, $mode=LookupConstants::LATEST_FROM_REPLICA)
 

Private Member Functions

 getLookup ( $entityType)
 

Private Attributes

 $lookups
 
 $defaultLookup
 

Detailed Description

An EntityRevisionLookup that does dispatching based on the entity type.

Author
Thiemo Kreuz

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup::__construct ( array $callbacks,
EntityRevisionLookup $defaultLookup )
Parameters
callable[]$callbacksindexed by entity type
EntityRevisionLookup$defaultLookup

Member Function Documentation

◆ getEntityRevision()

Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup::getEntityRevision ( EntityId $entityId,
$revisionId = 0,
$mode = LookupConstants::LATEST_FROM_REPLICA )
See also
EntityRevisionLookup::getEntityRevision
Parameters
EntityId$entityId
int$revisionId
string$mode
Exceptions
RevisionedUnresolvedRedirectException
StorageException
Returns
EntityRevision|null

Implements Wikibase\Lib\Store\EntityRevisionLookup.

◆ getLatestRevisionId()

Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup::getLatestRevisionId ( EntityId $entityId,
$mode = LookupConstants::LATEST_FROM_REPLICA )
See also
EntityRevisionLookup::getLatestRevisionId
Parameters
EntityId$entityId
string$mode
Returns
LatestRevisionIdResult

Implements Wikibase\Lib\Store\EntityRevisionLookup.

◆ getLookup()

Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup::getLookup ( $entityType)
private
Parameters
string$entityType
Exceptions
InvalidArgumentException
Returns
EntityRevisionLookup

Member Data Documentation

◆ $defaultLookup

Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup::$defaultLookup
private

◆ $lookups

Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup::$lookups
private

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