Class for handling remote TTMServers over MediaWiki API. 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. | |
Public Member Functions inherited from MediaWiki\Extension\Translate\TtmServer\TtmServer | |
__construct (array $config) | |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Extension\Translate\TtmServer\TtmServer | |
static | sortSuggestions (array $suggestions) |
static | onDelete (WikiPage $wikipage) |
Hook: ArticleDeleteComplete. | |
static | onChange (MessageHandle $handle) |
Called from TranslateEditAddons::onSave. | |
static | onGroupChange (MessageHandle $handle, array $old) |
Protected Attributes inherited from MediaWiki\Extension\Translate\TtmServer\TtmServer | |
array | $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 16 of file RemoteTtmServer.php.
MediaWiki\Extension\Translate\TtmServer\RemoteTtmServer::expandLocation | ( | array | $suggestion | ) |
Given suggestion returned by this TtmServer, constructs fully qualified URL to the location of the translation.
Implements MediaWiki\Extension\Translate\TtmServer\ReadableTtmServer.
Definition at line 26 of file RemoteTtmServer.php.
MediaWiki\Extension\Translate\TtmServer\RemoteTtmServer::isLocalSuggestion | ( | array | $suggestion | ) |
Determines if the suggestion returned by this TtmServer comes from this wiki or any other wiki.
Implements MediaWiki\Extension\Translate\TtmServer\ReadableTtmServer.
Definition at line 22 of file RemoteTtmServer.php.
MediaWiki\Extension\Translate\TtmServer\RemoteTtmServer::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 |
Implements MediaWiki\Extension\Translate\TtmServer\ReadableTtmServer.
Definition at line 17 of file RemoteTtmServer.php.