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

Adapter turning an ItemTermStoreWriter into an EntityTermStoreWriter. More...

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

Public Member Functions

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

Private Attributes

 $store
 

Detailed Description

Adapter turning an ItemTermStoreWriter into an EntityTermStoreWriter.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\ItemTermStoreWriterAdapter::__construct ( ItemTermStoreWriter  $store)

Member Function Documentation

◆ deleteTermsOfEntity()

Wikibase\Lib\Store\ItemTermStoreWriterAdapter::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\ItemTermStoreWriterAdapter::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\ItemTermStoreWriterAdapter::$store
private

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