Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
RemoteTTMServer.php
Go to the documentation of this file.
1<?php
20 public function query( $sourceLanguage, $targetLanguage, $text ) {
21 // @todo Implement some day perhaps?
22 return [];
23 }
24
25 public function isLocalSuggestion( array $suggestion ) {
26 return false;
27 }
28
29 public function expandLocation( array $suggestion ) {
30 return $suggestion['location'];
31 }
32}
Class for handling remote TTMServers over MediaWiki API.
isLocalSuggestion(array $suggestion)
Determines if the suggestion returned by this TTMServer comes from this wiki or any other wiki.
query( $sourceLanguage, $targetLanguage, $text)
Fetches all relevant suggestions for given text.
expandLocation(array $suggestion)
Given suggestion returned by this TTMServer, constructs fully qualified URL to the location of the tr...
Some general static methods for instantiating TTMServer and helpers.
Definition TTMServer.php:20
Interface for TTMServer that can be queried (=all of them).