Interface for TTMServer that can be updated. More...
Public Member Functions | |
update (MessageHandle $handle, $targetText) | |
Shovels the new translation into translation memory. | |
beginBootstrap () | |
Called when starting to fill the translation memory. | |
beginBatch () | |
Called before every batch (MessageGroup). | |
batchInsertDefinitions (array $batch) | |
Called multiple times per batch if necessary. | |
batchInsertTranslations (array $batch) | |
Called multiple times per batch if necessary. | |
endBatch () | |
Called before every batch (MessageGroup). | |
endBootstrap () | |
Do any cleanup, optimizing etc. | |
getMirrors () | |
Get the list of services to duplicate writes to make them "mirrors" of this service. | |
isFrozen () | |
Check if the service is frozen, attempting to write to a frozen service may lead to errors or unexpected behaviors. | |
setDoReIndex () | |
Instruct the service to fully wipe the index and start from scratch. | |
Interface for TTMServer that can be updated.
Definition at line 54 of file Interfaces.php.
WritableTTMServer::batchInsertDefinitions | ( | array | $batch | ) |
Called multiple times per batch if necessary.
array | $batch |
Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.
WritableTTMServer::batchInsertTranslations | ( | array | $batch | ) |
Called multiple times per batch if necessary.
array | $batch |
Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.
WritableTTMServer::beginBatch | ( | ) |
Called before every batch (MessageGroup).
Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.
WritableTTMServer::beginBootstrap | ( | ) |
Called when starting to fill the translation memory.
Set up necessary variables and remove old content from the server.
Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.
WritableTTMServer::endBatch | ( | ) |
Called before every batch (MessageGroup).
Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.
WritableTTMServer::endBootstrap | ( | ) |
Do any cleanup, optimizing etc.
Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.
WritableTTMServer::getMirrors | ( | ) |
Get the list of services to duplicate writes to make them "mirrors" of this service.
Implemented in FakeTTMServer.
WritableTTMServer::isFrozen | ( | ) |
Check if the service is frozen, attempting to write to a frozen service may lead to errors or unexpected behaviors.
Implemented in FakeTTMServer.
WritableTTMServer::setDoReIndex | ( | ) |
Instruct the service to fully wipe the index and start from scratch.
Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.
WritableTTMServer::update | ( | MessageHandle | $handle, |
$targetText ) |
Shovels the new translation into translation memory.
Use this for single updates (=after message edit). If no text is provided, entry will be removed from the translation memory.
MessageHandle | $handle | |
string | null | $targetText | Use null to only delete. |
Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.