Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
WritableTTMServer Interface Reference

Interface for TTMServer that can be updated. More...

Inheritance diagram for WritableTTMServer:
DatabaseTTMServer ElasticSearchTTMServer FakeTTMServer

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.
 

Detailed Description

Interface for TTMServer that can be updated.

Since
2012-06-27

Definition at line 54 of file Interfaces.php.

Member Function Documentation

◆ batchInsertDefinitions()

WritableTTMServer::batchInsertDefinitions ( array $batch)

Called multiple times per batch if necessary.

Parameters
array$batch

Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.

◆ batchInsertTranslations()

WritableTTMServer::batchInsertTranslations ( array $batch)

Called multiple times per batch if necessary.

Parameters
array$batch

Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.

◆ beginBatch()

WritableTTMServer::beginBatch ( )

Called before every batch (MessageGroup).

Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.

◆ beginBootstrap()

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.

◆ endBatch()

WritableTTMServer::endBatch ( )

Called before every batch (MessageGroup).

Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.

◆ endBootstrap()

WritableTTMServer::endBootstrap ( )

Do any cleanup, optimizing etc.

Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.

◆ getMirrors()

WritableTTMServer::getMirrors ( )

Get the list of services to duplicate writes to make them "mirrors" of this service.

Since
2017.04
Returns
string[]

Implemented in FakeTTMServer.

◆ isFrozen()

WritableTTMServer::isFrozen ( )

Check if the service is frozen, attempting to write to a frozen service may lead to errors or unexpected behaviors.

Since
2017.04
Deprecated
since 2022.04
Returns
bool true if the service is frozen

Implemented in FakeTTMServer.

◆ setDoReIndex()

WritableTTMServer::setDoReIndex ( )

Instruct the service to fully wipe the index and start from scratch.

Since
2020.01

Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.

◆ update()

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.

Parameters
MessageHandle$handle
string | null$targetTextUse null to only delete.

Implemented in DatabaseTTMServer, ElasticSearchTTMServer, and FakeTTMServer.


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