Wikibase
MediaWiki Wikibase extension
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 (EntityIdParser $entityIdParser, EntityIdComposer $entityIdComposer, Deserializer $dataValueDeserializer, NameTableStore $slotRoleStore, DataAccessSettings $dataAccessSettings, EntitySource $entitySource, LanguageFallbackChainFactory $languageFallbackChainFactory, Serializer $storageEntitySerializer, array $deserializerFactoryCallbacks, array $entityMetaDataAccessorCallbacks, array $prefetchingTermLookupCallbacks, array $entityRevisionFactoryLookupCallbacks)
 
 getEntitySource ()
 
 getTermInLangIdsResolver ()
 It would be nice to only return hint against the TermInLangIdsResolver interface here, but current users need a method only provided by DatabaseTermInLangIdsResolver. More...
 
 getTermSearchInteractorFactory ()
 
 getPrefetchingTermLookup ()
 
 getEntityPrefetcher ()
 
 getPropertyInfoLookup ()
 
 entityUpdated (EntityRevision $entityRevision)
 Called when an entity is updated, created, or replaces a redirect. More...
 
 redirectUpdated (EntityRedirect $entityRedirect, $revisionId)
 Called when a redirect is updated, created, or replaces an entity. More...
 
 entityDeleted (EntityId $entityId)
 Called when an entity or redirect is deleted. More...
 

Private Member Functions

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

Private Attributes

 $entityIdParser
 
 $entityIdComposer
 
 $dataValueDeserializer
 
 $dataAccessSettings
 
 $entitySource
 
 $languageFallbackChainFactory
 
 $deserializerFactoryCallbacks
 
 $entityMetaDataAccessorCallbacks
 
 $prefetchingTermLookupCallbacks
 
 $slotRoleStore
 
 $entityRevisionLookup = null
 
 $termSearchInteractorFactory = null
 
 $prefetchingTermLookup = null
 
 $entityMetaDataAccessor = null
 
 $propertyInfoLookup = null
 
 $entityRevisionLookupFactoryCallbacks
 
 $storageEntitySerializer
 

Detailed Description

Collection of services for a single EntitySource.

Some generic services 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 ( EntityIdParser  $entityIdParser,
EntityIdComposer  $entityIdComposer,
Deserializer  $dataValueDeserializer,
NameTableStore  $slotRoleStore,
DataAccessSettings  $dataAccessSettings,
EntitySource  $entitySource,
LanguageFallbackChainFactory  $languageFallbackChainFactory,
Serializer  $storageEntitySerializer,
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.

◆ 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 ( )

◆ 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

◆ $languageFallbackChainFactory

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

◆ $storageEntitySerializer

Wikibase\DataAccess\SingleEntitySourceServices::$storageEntitySerializer
private

◆ $termSearchInteractorFactory

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

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