Translate extension for MediaWiki
Loading...
Searching...
No Matches
WritableTtmServer.php
1
<?php
2
declare( strict_types = 1 );
3
4
namespace
MediaWiki\Extension\Translate\TtmServer;
5
6
use
MediaWiki\Extension\Translate\MessageLoading\MessageHandle
;
7
12
interface
WritableTtmServer
{
22
public
function
update
(
MessageHandle
$handle, ?
string
$targetText ): bool;
23
29
public
function
beginBootstrap
(): void;
30
32
public
function
beginBatch
(): void;
33
35
public
function
batchInsertDefinitions
( array $batch ): void;
36
38
public
function
batchInsertTranslations
( array $batch ): void;
39
41
public
function
endBatch
(): void;
42
44
public
function
endBootstrap
(): void;
45
47
public
function
setDoReIndex
(): void;
48
}
MediaWiki\Extension\Translate\MessageLoading\MessageHandle
Class for pointing to messages, like Title class is for titles.
Definition
MessageHandle.php:26
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer
Interface for TtmServer that can be updated.
Definition
WritableTtmServer.php:12
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer\batchInsertTranslations
batchInsertTranslations(array $batch)
Called multiple times per batch if necessary.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer\batchInsertDefinitions
batchInsertDefinitions(array $batch)
Called multiple times per batch if necessary.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer\update
update(MessageHandle $handle, ?string $targetText)
Shovels the new translation into translation memory.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer\setDoReIndex
setDoReIndex()
Instruct the service to fully wipe the index and start from scratch.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer\beginBootstrap
beginBootstrap()
Called when starting to fill the translation memory.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer\endBootstrap
endBootstrap()
Do any cleanup, optimizing etc.
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer\beginBatch
beginBatch()
Called before every batch (MessageGroup).
MediaWiki\Extension\Translate\TtmServer\WritableTtmServer\endBatch
endBatch()
Called after every batch (MessageGroup).
src
TtmServer
WritableTtmServer.php
Generated by
1.10.0