blob: 15f8d377bb87ae6e84f055c15448d22b2714e4d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<?php
/**
* TTMServer - The Translate extension translation memory interface
*
* @file
* @author Niklas Laxström
* @copyright Copyright © 2012-2013, Niklas Laxström
* @license GPL-2.0+
* @ingroup TTMServer
*/
/**
* NO-OP version of TTMServer when it is disabled.
* Keeps other code simpler when they can just do
* TTMServer::primary()->update( ... );
* @since 2012-01-28
* @ingroup TTMServer
*/
class FakeTTMServer implements ReadableTTMServer, WritableTTMServer {
public function query( $sourceLanguage, $targetLanguage, $text ) {
return array();
}
public function isLocalSuggestion( array $suggestion ) {
false;
}
public function expandLocation( array $suggestion ) {
return '';
}
public function update( MessageHandle $handle, $targetText ) {
}
public function beginBootstrap() {
}
public function beginBatch() {
}
public function batchInsertDefinitions( array $batch ) {
}
public function batchInsertTranslations( array $batch ) {
}
public function endBatch() {
}
public function endBootstrap() {
}
}
|