Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
FakeTTMServer.php
Go to the documentation of this file.
1<?php
20 public function query( $sourceLanguage, $targetLanguage, $text ) {
21 return [];
22 }
23
24 public function isLocalSuggestion( array $suggestion ) {
25 return false;
26 }
27
28 public function expandLocation( array $suggestion ) {
29 return '';
30 }
31
32 public function update( MessageHandle $handle, $targetText ) {
33 }
34
35 public function beginBootstrap() {
36 }
37
38 public function beginBatch() {
39 }
40
41 public function batchInsertDefinitions( array $batch ) {
42 }
43
44 public function batchInsertTranslations( array $batch ) {
45 }
46
47 public function endBatch() {
48 }
49
50 public function endBootstrap() {
51 }
52
53 public function getMirrors() {
54 return [];
55 }
56
57 public function isFrozen() {
58 return false;
59 }
60
61 public function setDoReIndex() {
62 }
63}
NO-OP version of TTMServer when it is disabled.
endBatch()
Called before every batch (MessageGroup).
isLocalSuggestion(array $suggestion)
Determines if the suggestion returned by this TTMServer comes from this wiki or any other wiki.
batchInsertDefinitions(array $batch)
Called multiple times per batch if necessary.
getMirrors()
Get the list of services to duplicate writes to make them "mirrors" of this service.
update(MessageHandle $handle, $targetText)
Shovels the new translation into translation memory.
expandLocation(array $suggestion)
Given suggestion returned by this TTMServer, constructs fully qualified URL to the location of the tr...
beginBatch()
Called before every batch (MessageGroup).
setDoReIndex()
Instruct the service to fully wipe the index and start from scratch.
query( $sourceLanguage, $targetLanguage, $text)
Fetches all relevant suggestions for given text.
isFrozen()
Check if the service is frozen, attempting to write to a frozen service may lead to errors or unexpec...
beginBootstrap()
Called when starting to fill the translation memory.
batchInsertTranslations(array $batch)
Called multiple times per batch if necessary.
endBootstrap()
Do any cleanup, optimizing etc.
Class for pointing to messages, like Title class is for titles.
Interface for TTMServer that can be queried (=all of them).
Interface for TTMServer that can be updated.