Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\TranslatorInterface\Aid\QueryAggregatorAwareTranslationAid Class Reference

Helper class for translation aids that use web services. More...

Inheritance diagram for MediaWiki\Extension\Translate\TranslatorInterface\Aid\QueryAggregatorAwareTranslationAid:
MediaWiki\Extension\Translate\TranslatorInterface\Aid\TranslationAid MediaWiki\Extension\Translate\WebService\QueryAggregatorAware MediaWiki\Extension\Translate\TranslatorInterface\Aid\MachineTranslationAid MediaWiki\Extension\Translate\TranslatorInterface\Aid\TTMServerAid

Public Member Functions

 setQueryAggregator (QueryAggregator $aggregator)
 
- Public Member Functions inherited from MediaWiki\Extension\Translate\TranslatorInterface\Aid\TranslationAid
 __construct (MessageGroup $group, MessageHandle $handle, IContextSource $context, TranslationAidDataProvider $dataProvider)
 
 getData ()
 Translation aid class should implement this function.
 
- Public Member Functions inherited from MediaWiki\Extension\Translate\WebService\QueryAggregatorAware
 populateQueries ()
 

Protected Member Functions

 storeQuery (TranslationWebService $service, string $from, string $to, string $text)
 Stores a web service query for later execution.
 
 getQueryData ()
 Returns all stored queries.
 

Additional Inherited Members

- Static Public Member Functions inherited from MediaWiki\Extension\Translate\TranslatorInterface\Aid\TranslationAid
static getTypes ()
 List of available message types mapped to the classes implementing them.
 
- Protected Attributes inherited from MediaWiki\Extension\Translate\TranslatorInterface\Aid\TranslationAid
 $group
 
 $handle
 
 $context
 
 $dataProvider
 

Detailed Description

Helper class for translation aids that use web services.

Author
Niklas Laxström @license GPL-2.0-or-later
Since
2015.02

Definition at line 17 of file QueryAggregatorAwareTranslationAid.php.

Member Function Documentation

◆ getQueryData()

MediaWiki\Extension\Translate\TranslatorInterface\Aid\QueryAggregatorAwareTranslationAid::getQueryData ( )
protected

Returns all stored queries.

Returns
array Map of executed queries:
  • language: string: source language
  • text: string: source text
  • response: TranslationQueryResponse

Definition at line 61 of file QueryAggregatorAwareTranslationAid.php.

◆ setQueryAggregator()

MediaWiki\Extension\Translate\TranslatorInterface\Aid\QueryAggregatorAwareTranslationAid::setQueryAggregator ( QueryAggregator $aggregator)

◆ storeQuery()

MediaWiki\Extension\Translate\TranslatorInterface\Aid\QueryAggregatorAwareTranslationAid::storeQuery ( TranslationWebService $service,
string $from,
string $to,
string $text )
protected

Stores a web service query for later execution.

Parameters
TranslationWebService$service
string$from
string$to
string$text
Returns
void

Definition at line 37 of file QueryAggregatorAwareTranslationAid.php.


The documentation for this class was generated from the following file: