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

Sometimes we need an EntityTermStoreWriter that is not expected to be called. More...

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

Public Member Functions

 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.
 

Detailed Description

Sometimes we need an EntityTermStoreWriter that is not expected to be called.

The main use of this class is for ItemHandler and PropertyHandler which do things relating to both reading and writing. If they should only be used for reading, such as with non local entity sources, the service is still needed, but should not be called.

Member Function Documentation

◆ deleteTermsOfEntity()

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

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

Parameters
EntityId$entityId
Returns
bool Success indicator

Implements Wikibase\Lib\Store\EntityTermStoreWriter.

◆ saveTermsOfEntity()

Wikibase\Lib\Store\ThrowingEntityTermStoreWriter::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
bool Success indicator

Implements Wikibase\Lib\Store\EntityTermStoreWriter.


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