Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Store\PropertyTermStoreWriterAdapter Class Reference

Adapter turning a PropertyTermStoreWriter into an EntityTermStoreWriter. More...

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

Public Member Functions

 __construct (PropertyTermStoreWriter $store)
 
 saveTermsOfEntity (EntityDocument $entity)
 Saves the terms of the provided entity in the term cache. More...
 
 deleteTermsOfEntity (EntityId $entityId)
 Deletes the terms of the provided entity from the term cache. More...
 

Private Attributes

 $store
 

Detailed Description

Adapter turning a PropertyTermStoreWriter into an EntityTermStoreWriter.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\PropertyTermStoreWriterAdapter::__construct ( PropertyTermStoreWriter  $store)

Member Function Documentation

◆ deleteTermsOfEntity()

Wikibase\Lib\Store\PropertyTermStoreWriterAdapter::deleteTermsOfEntity ( EntityId  $entityId)

Deletes the terms of the provided entity from the term cache.

Parameters
EntityId$entityId
Returns
boolean Success indicator

Implements Wikibase\Lib\Store\EntityTermStoreWriter.

◆ saveTermsOfEntity()

Wikibase\Lib\Store\PropertyTermStoreWriterAdapter::saveTermsOfEntity ( EntityDocument  $entity)

Saves the terms of the provided entity in the term cache.

Parameters
EntityDocument$entityMust have an ID, and optionally any combination of terms as declared by the TermIndexEntry::TYPE_... constants.
Exceptions
InvalidArgumentExceptionwhen $entity does not have an ID.
Returns
boolean Success indicator

Implements Wikibase\Lib\Store\EntityTermStoreWriter.

Member Data Documentation

◆ $store

Wikibase\Lib\Store\PropertyTermStoreWriterAdapter::$store
private

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