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

Handles caching of translator activity. More...

Public Member Functions

 __construct (BagOStuff $cache, TranslatorActivityQuery $query, JobQueueGroup $jobQueue)
 
 inLanguage (string $language)
 Get translations activity for a given language.
 
 updateAllLanguages ()
 Update cache for all languages, even if not stale.
 
 updateLanguage (string $language)
 Update cache for one language, even if not stale.
 

Public Attributes

const CACHE_TIME = 3 * 24 * 3600
 
const CACHE_STALE = 25 * 3600
 

Detailed Description

Handles caching of translator activity.

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

Definition at line 21 of file TranslatorActivity.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\Statistics\TranslatorActivity::__construct ( BagOStuff $cache,
TranslatorActivityQuery $query,
JobQueueGroup $jobQueue )

Definition at line 29 of file TranslatorActivity.php.

Member Function Documentation

◆ inLanguage()

MediaWiki\Extension\Translate\Statistics\TranslatorActivity::inLanguage ( string $language)

Get translations activity for a given language.

Exceptions
StatisticsUnavailableIf loading statistics is temporarily not possible.

Definition at line 43 of file TranslatorActivity.php.

◆ updateAllLanguages()

MediaWiki\Extension\Translate\Statistics\TranslatorActivity::updateAllLanguages ( )

Update cache for all languages, even if not stale.

Definition at line 113 of file TranslatorActivity.php.

◆ updateLanguage()

MediaWiki\Extension\Translate\Statistics\TranslatorActivity::updateLanguage ( string $language)

Update cache for one language, even if not stale.

Exceptions
StatisticsUnavailableIf loading statistics is temporarily not possible.

Definition at line 137 of file TranslatorActivity.php.

Member Data Documentation

◆ CACHE_STALE

const MediaWiki\Extension\Translate\Statistics\TranslatorActivity::CACHE_STALE = 25 * 3600

Definition at line 24 of file TranslatorActivity.php.

◆ CACHE_TIME

const MediaWiki\Extension\Translate\Statistics\TranslatorActivity::CACHE_TIME = 3 * 24 * 3600

Definition at line 22 of file TranslatorActivity.php.


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