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. |
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.
$sourceLanguage | String: language code for the provide text | |
$targetLanguage | String: language code for the suggestions | |
$text | String: the text for which to search suggestions |
Implements ReadableTTMServer.
Definition at line 20 of file RemoteTTMServer.php.