NO-OP version of TTMServer when it is disabled. More...
Public Member Functions | |
query ($sourceLanguage, $targetLanguage, $text) | |
Fetches all relevant suggestions for given text. | |
isLocalSuggestion (array $suggestion) | |
Determines if the suggestion returned by this TTMServer comes from this wiki or any other wiki. | |
expandLocation (array $suggestion) | |
Given suggestion returned by this TTMServer, constructs fully qualified URL to the location of the translation. | |
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. |
NO-OP version of TTMServer when it is disabled.
Keeps other code simpler when they can just do TTMServer::primary()->update( ... );
Definition at line 19 of file FakeTTMServer.php.
FakeTTMServer::batchInsertDefinitions | ( | array $ | batch | ) |
Called multiple times per batch if necessary.
Implements WritableTTMServer.
Definition at line 41 of file FakeTTMServer.php.
FakeTTMServer::batchInsertTranslations | ( | array $ | batch | ) |
Called multiple times per batch if necessary.
Implements WritableTTMServer.
Definition at line 44 of file FakeTTMServer.php.
FakeTTMServer::beginBatch | ( | ) |
Called before every batch (MessageGroup).
Implements WritableTTMServer.
Definition at line 38 of file FakeTTMServer.php.
FakeTTMServer::beginBootstrap | ( | ) |
Called when starting to fill the translation memory.
Set up necessary variables and remove old content from the server.
Implements WritableTTMServer.
Definition at line 35 of file FakeTTMServer.php.
FakeTTMServer::endBatch | ( | ) |
Called before every batch (MessageGroup).
Implements WritableTTMServer.
Definition at line 47 of file FakeTTMServer.php.
FakeTTMServer::endBootstrap | ( | ) |
Do any cleanup, optimizing etc.
Implements WritableTTMServer.
Definition at line 50 of file FakeTTMServer.php.
FakeTTMServer::expandLocation | ( | array $ | suggestion | ) |
Given suggestion returned by this TTMServer, constructs fully qualified URL to the location of the translation.
array | $suggestion |
Implements ReadableTTMServer.
Definition at line 28 of file FakeTTMServer.php.
FakeTTMServer::isLocalSuggestion | ( | array $ | suggestion | ) |
Determines if the suggestion returned by this TTMServer comes from this wiki or any other wiki.
array | $suggestion |
Implements ReadableTTMServer.
Definition at line 24 of file FakeTTMServer.php.
FakeTTMServer::query | ( | $ | sourceLanguage, | |
$ | targetLanguage, | |||
$ | text | |||
) |
Fetches all relevant suggestions for given text.
$sourceLanguage | String: language code for the provide text | |
$targetLanguage | String: language code for the suggestions | |
$text | String: the text for which to search suggestions |
Implements ReadableTTMServer.
Definition at line 20 of file FakeTTMServer.php.
FakeTTMServer::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. |
Implements WritableTTMServer.
Definition at line 32 of file FakeTTMServer.php.