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

Collection of services for a single EntitySource. More...

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

Public Member Functions

 __construct (GenericServices $genericServices, EntityIdParser $entityIdParser, EntityIdComposer $entityIdComposer, Deserializer $dataValueDeserializer, NameTableStore $slotRoleStore, DataAccessSettings $dataAccessSettings, EntitySource $entitySource, array $deserializerFactoryCallbacks, array $entityMetaDataAccessorCallbacks, array $prefetchingTermLookupCallbacks, array $entityRevisionFactoryLookupCallbacks)
 
 getEntitySource ()
 
 getDataAccessSettings ()
 
 getTermInLangIdsResolver ()
 It would be nice to only return hint against the TermInLangIdsResolver interface here, but current users need a method only provided by DatabaseTermInLangIdsResolver.
 
 getTermSearchInteractorFactory ()
 
 getTermIndexPrefetchingTermLookup ()
 
 getPrefetchingTermLookup ()
 
 getEntityPrefetcher ()
 
 getPropertyInfoLookup ()
 
 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.
 

Private Member Functions

 assertCallbackArrayTypes (array $deserializerFactoryCallbacks, array $entityMetaDataAccessorCallbacks, array $prefetchingTermLookupCallbacks, array $entityRevisionFactoryLookupCallbacks)
 
 getEntityDeserializer ()
 
 getEntityMetaDataAccessor ()
 
 getMatchingTermsLookup ()
 
 getTermIndex ()
 
 getPrefetchingTermLookups ()
 

Private Attributes

 $genericServices
 
 $entityIdParser
 
 $entityIdComposer
 
 $dataValueDeserializer
 
 $dataAccessSettings
 
 $entitySource
 
 $deserializerFactoryCallbacks
 
 $entityMetaDataAccessorCallbacks
 
 $prefetchingTermLookupCallbacks
 
 $slotRoleStore
 
 $entityRevisionLookup = null
 
 $termSearchInteractorFactory = null
 
 $termIndex = null
 
 $termIndexPrefetchingTermLookup = null
 
 $prefetchingTermLookup = null
 
 $entityMetaDataAccessor = null
 
 $propertyInfoLookup = null
 
 $entityRevisionLookupFactoryCallbacks
 

Detailed Description

Collection of services for a single EntitySource.

Some GenericServices are injected alongside some more specific services for the EntitySource. Various logic then pulls these services together into more composed services.

TODO fixme, lots of things in this class bind to wikibase lib and mediawiki directly.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataAccess\SingleEntitySourceServices::__construct ( GenericServices  $genericServices,
EntityIdParser  $entityIdParser,
EntityIdComposer  $entityIdComposer,
Deserializer  $dataValueDeserializer,
NameTableStore  $slotRoleStore,
DataAccessSettings  $dataAccessSettings,
EntitySource  $entitySource,
array  $deserializerFactoryCallbacks,
array  $entityMetaDataAccessorCallbacks,
array  $prefetchingTermLookupCallbacks,
array  $entityRevisionFactoryLookupCallbacks 
)

Member Function Documentation

◆ assertCallbackArrayTypes()

Wikibase\DataAccess\SingleEntitySourceServices::assertCallbackArrayTypes ( array  $deserializerFactoryCallbacks,
array  $entityMetaDataAccessorCallbacks,
array  $prefetchingTermLookupCallbacks,
array  $entityRevisionFactoryLookupCallbacks 
)
private

◆ entityDeleted()

Wikibase\DataAccess\SingleEntitySourceServices::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\SingleEntitySourceServices::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.

◆ getDataAccessSettings()

Wikibase\DataAccess\SingleEntitySourceServices::getDataAccessSettings ( )
Deprecated:
This should not be used, and was introduced only to fix an UBN on master. This is currently used to create a TermStoresDelegatingPrefetchingItemTermLookup, when that service construction should actually be moved to within this class. The TermStoresDelegatingPrefetchingItemTermLookup service will be going away once we remove all wb_terms migration related code, and thus we will remove this method after that point.
Returns
DataAccessSettings

◆ getEntityDeserializer()

Wikibase\DataAccess\SingleEntitySourceServices::getEntityDeserializer ( )
private

◆ getEntityMetaDataAccessor()

Wikibase\DataAccess\SingleEntitySourceServices::getEntityMetaDataAccessor ( )
private

◆ getEntityPrefetcher()

Wikibase\DataAccess\SingleEntitySourceServices::getEntityPrefetcher ( )

◆ getEntitySource()

Wikibase\DataAccess\SingleEntitySourceServices::getEntitySource ( )
Returns
EntitySource The EntitySource object for this set of services

◆ getMatchingTermsLookup()

Wikibase\DataAccess\SingleEntitySourceServices::getMatchingTermsLookup ( )
private

◆ getPrefetchingTermLookup()

Wikibase\DataAccess\SingleEntitySourceServices::getPrefetchingTermLookup ( )

◆ getPrefetchingTermLookups()

Wikibase\DataAccess\SingleEntitySourceServices::getPrefetchingTermLookups ( )
private
Returns
PrefetchingItemTermLookup[] indexed by entity type

◆ getPropertyInfoLookup()

Wikibase\DataAccess\SingleEntitySourceServices::getPropertyInfoLookup ( )

◆ getTermIndex()

Wikibase\DataAccess\SingleEntitySourceServices::getTermIndex ( )
private

◆ getTermIndexPrefetchingTermLookup()

Wikibase\DataAccess\SingleEntitySourceServices::getTermIndexPrefetchingTermLookup ( )
Deprecated:
This will be removed once wb_terms related code has been removed from Wikibase
Returns
BufferingTermIndexTermLookup

◆ getTermInLangIdsResolver()

Wikibase\DataAccess\SingleEntitySourceServices::getTermInLangIdsResolver ( )

It would be nice to only return hint against the TermInLangIdsResolver interface here, but current users need a method only provided by DatabaseTermInLangIdsResolver.

Returns
DatabaseTermInLangIdsResolver

◆ getTermSearchInteractorFactory()

Wikibase\DataAccess\SingleEntitySourceServices::getTermSearchInteractorFactory ( )

◆ redirectUpdated()

Wikibase\DataAccess\SingleEntitySourceServices::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

◆ $dataAccessSettings

Wikibase\DataAccess\SingleEntitySourceServices::$dataAccessSettings
private

◆ $dataValueDeserializer

Wikibase\DataAccess\SingleEntitySourceServices::$dataValueDeserializer
private

◆ $deserializerFactoryCallbacks

Wikibase\DataAccess\SingleEntitySourceServices::$deserializerFactoryCallbacks
private

◆ $entityIdComposer

Wikibase\DataAccess\SingleEntitySourceServices::$entityIdComposer
private

◆ $entityIdParser

Wikibase\DataAccess\SingleEntitySourceServices::$entityIdParser
private

◆ $entityMetaDataAccessor

Wikibase\DataAccess\SingleEntitySourceServices::$entityMetaDataAccessor = null
private

◆ $entityMetaDataAccessorCallbacks

Wikibase\DataAccess\SingleEntitySourceServices::$entityMetaDataAccessorCallbacks
private

◆ $entityRevisionLookup

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

◆ $entityRevisionLookupFactoryCallbacks

Wikibase\DataAccess\SingleEntitySourceServices::$entityRevisionLookupFactoryCallbacks
private

◆ $entitySource

Wikibase\DataAccess\SingleEntitySourceServices::$entitySource
private

◆ $genericServices

Wikibase\DataAccess\SingleEntitySourceServices::$genericServices
private

◆ $prefetchingTermLookup

Wikibase\DataAccess\SingleEntitySourceServices::$prefetchingTermLookup = null
private

◆ $prefetchingTermLookupCallbacks

Wikibase\DataAccess\SingleEntitySourceServices::$prefetchingTermLookupCallbacks
private

◆ $propertyInfoLookup

Wikibase\DataAccess\SingleEntitySourceServices::$propertyInfoLookup = null
private

◆ $slotRoleStore

Wikibase\DataAccess\SingleEntitySourceServices::$slotRoleStore
private

◆ $termIndex

Wikibase\DataAccess\SingleEntitySourceServices::$termIndex = null
private

◆ $termIndexPrefetchingTermLookup

Wikibase\DataAccess\SingleEntitySourceServices::$termIndexPrefetchingTermLookup = null
private

◆ $termSearchInteractorFactory

Wikibase\DataAccess\SingleEntitySourceServices::$termSearchInteractorFactory = null
private

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