Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\Statistics\TranslatorActivityQuery Class Reference

Gathers translator activity from the database. More...

Public Member Functions

 __construct (Config $options, ILoadBalancer $loadBalancer)
 
 inLanguage (string $code)
 Fetch the translators for a language.
 
 inAllLanguages ()
 Fetch the translators for all languages.
 

Public Attributes

const USER_NAME = 0
 
const USER_TRANSLATIONS = 1
 
const USER_LAST_ACTIVITY = 2
 

Detailed Description

Gathers translator activity from the database.

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

Definition at line 16 of file TranslatorActivityQuery.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\Statistics\TranslatorActivityQuery::__construct ( Config $options,
ILoadBalancer $loadBalancer )

Definition at line 23 of file TranslatorActivityQuery.php.

Member Function Documentation

◆ inAllLanguages()

MediaWiki\Extension\Translate\Statistics\TranslatorActivityQuery::inAllLanguages ( )

Fetch the translators for all languages.

This is faster than doing each language separately.

Returns
array<string,array<int,array<string|int|string>>> Map of language tags to translation stats per user

Definition at line 76 of file TranslatorActivityQuery.php.

◆ inLanguage()

MediaWiki\Extension\Translate\Statistics\TranslatorActivityQuery::inLanguage ( string $code)

Fetch the translators for a language.

Parameters
string$codeLanguage tag
Returns
array<int,array<string|int|string>> Translation stats per user

Definition at line 34 of file TranslatorActivityQuery.php.

Member Data Documentation

◆ USER_LAST_ACTIVITY

const MediaWiki\Extension\Translate\Statistics\TranslatorActivityQuery::USER_LAST_ACTIVITY = 2

Definition at line 19 of file TranslatorActivityQuery.php.

◆ USER_NAME

const MediaWiki\Extension\Translate\Statistics\TranslatorActivityQuery::USER_NAME = 0

Definition at line 17 of file TranslatorActivityQuery.php.

◆ USER_TRANSLATIONS

const MediaWiki\Extension\Translate\Statistics\TranslatorActivityQuery::USER_TRANSLATIONS = 1

Definition at line 18 of file TranslatorActivityQuery.php.


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