Interface for TtmServer that can be queried (=all of them). More...
Public Member Functions | |
query (string $sourceLanguage, string $targetLanguage, string $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. | |
Interface for TtmServer that can be queried (=all of them).
Definition at line 10 of file ReadableTtmServer.php.
MediaWiki\Extension\Translate\TtmServer\ReadableTtmServer::expandLocation | ( | array | $suggestion | ) |
Given suggestion returned by this TtmServer, constructs fully qualified URL to the location of the translation.
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeReadableTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\RemoteTtmServer.
MediaWiki\Extension\Translate\TtmServer\ReadableTtmServer::isLocalSuggestion | ( | array | $suggestion | ) |
Determines if the suggestion returned by this TtmServer comes from this wiki or any other wiki.
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeReadableTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\RemoteTtmServer.
MediaWiki\Extension\Translate\TtmServer\ReadableTtmServer::query | ( | string | $sourceLanguage, |
string | $targetLanguage, | ||
string | $text ) |
Fetches all relevant suggestions for given text.
string | $sourceLanguage | language code for the provide text |
string | $targetLanguage | language code for the suggestions |
string | $text | the text for which to search suggestions |
Implemented in MediaWiki\Extension\Translate\TtmServer\DatabaseTtmServer, MediaWiki\Extension\Translate\TtmServer\ElasticSearchTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeReadableTtmServer, MediaWiki\Extension\Translate\TtmServer\FakeTtmServer, and MediaWiki\Extension\Translate\TtmServer\RemoteTtmServer.