Class for handling remote TTMServers over MediaWiki API. 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. | |
![]() | |
__construct (array $config) | |
getMirrors () | |
isFrozen () | |
Additional Inherited Members | |
![]() | |
static | factory (array $config) |
static | primary () |
Returns the primary server instance, useful for chaining. | |
static | sortSuggestions (array $suggestions) |
static | levenshtein ( $str1, $str2, $length1, $length2) |
PHP implementation of Levenshtein edit distance algorithm. | |
static | onDelete (WikiPage $wikipage) |
Hook: ArticleDeleteComplete. | |
static | onChange (MessageHandle $handle) |
Called from TranslateEditAddons::onSave. | |
static | onGroupChange (MessageHandle $handle, $old) |
![]() | |
$config | |
Class for handling remote TTMServers over MediaWiki API.
Currently querying is done in TranslationHelpers, and this class only handles location retrieval.
Definition at line 19 of file RemoteTTMServer.php.
RemoteTTMServer::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 29 of file RemoteTTMServer.php.
RemoteTTMServer::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 25 of file RemoteTTMServer.php.
RemoteTTMServer::query | ( | $sourceLanguage, | |
$targetLanguage, | |||
$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 |
Implements ReadableTTMServer.
Definition at line 20 of file RemoteTTMServer.php.