Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\DataAccess\MultipleEntitySourceServices Class Reference

TODO this has been introduced into data-access with a couple of points that still bind to wikibase lib: More...

+ Inheritance diagram for Wikibase\DataAccess\MultipleEntitySourceServices:
+ Collaboration diagram for Wikibase\DataAccess\MultipleEntitySourceServices:

Public Member Functions

 __construct (EntitySourceDefinitions $entitySourceDefinitions, array $singleSourceServices)
 
 getPropertyInfoLookup ()
 
 getEntityStoreWatcher ()
 Returns a service that can be registered as a watcher to changes to entity data.
 
 entityUpdated (EntityRevision $entityRevision)
 Called when an entity is updated, created, or replaces a redirect.
 
 redirectUpdated (EntityRedirect $entityRedirect, $revisionId)
 Called when a redirect is updated, created, or replaces an entity.
 
 entityDeleted (EntityId $entityId)
 Called when an entity or redirect is deleted.
 
- Public Member Functions inherited from Wikibase\DataAccess\DataAccessServices
 getEntityPrefetcher ()
 
 getEntityRevisionLookup ()
 

Private Attributes

 $entitySourceDefinitions
 
 $singleSourceServices
 
 $entityRevisionLookup = null
 
 $entityPrefetcher = null
 

Detailed Description

TODO this has been introduced into data-access with a couple of points that still bind to wikibase lib:

  • Wikibase\Lib\Store\EntityRevision; (could already be moved to data-access)
  • Wikibase\Lib\Store\EntityStoreWatcher; (only binds to EntityRevision within lib)

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataAccess\MultipleEntitySourceServices::__construct ( EntitySourceDefinitions $entitySourceDefinitions,
array $singleSourceServices )
Parameters
EntitySourceDefinitions$entitySourceDefinitions
SingleEntitySourceServices[]$singleSourceServicesindexed by source name

Member Function Documentation

◆ entityDeleted()

Wikibase\DataAccess\MultipleEntitySourceServices::entityDeleted ( EntityId $entityId)

Called when an entity or redirect is deleted.

This is not called when an entity is replaced by a redirect or vice versa.

Parameters
EntityId$entityId

Implements Wikibase\Lib\Store\EntityStoreWatcher.

◆ entityUpdated()

Wikibase\DataAccess\MultipleEntitySourceServices::entityUpdated ( EntityRevision $entityRevision)

Called when an entity is updated, created, or replaces a redirect.

This is not called when an entity is deleted or replaced by a redirect.

Parameters
EntityRevision$entityRevision

Implements Wikibase\Lib\Store\EntityStoreWatcher.

◆ getEntityStoreWatcher()

Wikibase\DataAccess\MultipleEntitySourceServices::getEntityStoreWatcher ( )

Returns a service that can be registered as a watcher to changes to entity data.

Such watcher gets notified when entity is updated or deleted, or when the entity redirect is updated.

Returns
EntityStoreWatcher

Implements Wikibase\DataAccess\WikibaseServices.

◆ getPropertyInfoLookup()

Wikibase\DataAccess\MultipleEntitySourceServices::getPropertyInfoLookup ( )
Note
Instance returned is not guaranteed to be a caching decorator. Callers should take care of caching themselves.
Returns
PropertyInfoLookup

Implements Wikibase\DataAccess\DataAccessServices.

◆ redirectUpdated()

Wikibase\DataAccess\MultipleEntitySourceServices::redirectUpdated ( EntityRedirect $entityRedirect,
$revisionId )

Called when a redirect is updated, created, or replaces an entity.

Not called when a redirect is deleted or replaced by an entity.

Parameters
EntityRedirect$entityRedirect
int$revisionId

Implements Wikibase\Lib\Store\EntityStoreWatcher.

Member Data Documentation

◆ $entityPrefetcher

Wikibase\DataAccess\MultipleEntitySourceServices::$entityPrefetcher = null
private

◆ $entityRevisionLookup

Wikibase\DataAccess\MultipleEntitySourceServices::$entityRevisionLookup = null
private

◆ $entitySourceDefinitions

Wikibase\DataAccess\MultipleEntitySourceServices::$entitySourceDefinitions
private

◆ $singleSourceServices

Wikibase\DataAccess\MultipleEntitySourceServices::$singleSourceServices
private

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