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

A base module for querying message group related stats. More...

Inheritance diagram for MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi:
MediaWiki\Extension\Translate\Statistics\QueryLanguageStatsActionApi MediaWiki\Extension\Translate\Statistics\QueryMessageGroupStatsActionApi

Public Member Functions

 __construct (ApiQuery $queryModule, string $moduleName, string $paramPrefix, JobQueueGroup $jobQueueGroup)
 
 getCacheMode ( $params)
 
 execute ()
 

Protected Member Functions

 validateTargetParamater (array $params)
 Implement this to implement input validation and return the name of the target that is then given to loadStats.
 
 loadStatistics (string $target, int $flags=0)
 Implement this to load stats.
 
 makeStatsItem (string $item, array $stats)
 Implement this to load each individual stat item.
 
 makeItem (array $stats)
 
 getCacheRebuildJob (string $target)
 
 getAllowedParams ()
 

Detailed Description

A base module for querying message group related stats.

Author
Niklas Laxström @license GPL-2.0-or-later
Since
2012-11-30

Definition at line 23 of file QueryStatsActionApi.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi::__construct ( ApiQuery $queryModule,
string $moduleName,
string $paramPrefix,
JobQueueGroup $jobQueueGroup )

Definition at line 27 of file QueryStatsActionApi.php.

Member Function Documentation

◆ execute()

MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi::execute ( )

◆ getAllowedParams()

MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi::getAllowedParams ( )
protected

◆ getCacheMode()

MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi::getCacheMode ( $params)

Definition at line 37 of file QueryStatsActionApi.php.

◆ getCacheRebuildJob()

MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi::getCacheRebuildJob ( string $target)
abstractprotected

◆ loadStatistics()

MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi::loadStatistics ( string $target,
int $flags = 0 )
abstractprotected

Implement this to load stats.

Parameters
string$target
int$flagsSee MessageGroupStats for possible flags
Returns
array[]

Reimplemented in MediaWiki\Extension\Translate\Statistics\QueryLanguageStatsActionApi, and MediaWiki\Extension\Translate\Statistics\QueryMessageGroupStatsActionApi.

◆ makeItem()

MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi::makeItem ( array $stats)
protected

Definition at line 94 of file QueryStatsActionApi.php.

◆ makeStatsItem()

MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi::makeStatsItem ( string $item,
array $stats )
abstractprotected

◆ validateTargetParamater()

MediaWiki\Extension\Translate\Statistics\QueryStatsActionApi::validateTargetParamater ( array $params)
abstractprotected

Implement this to implement input validation and return the name of the target that is then given to loadStats.

Reimplemented in MediaWiki\Extension\Translate\Statistics\QueryLanguageStatsActionApi, and MediaWiki\Extension\Translate\Statistics\QueryMessageGroupStatsActionApi.


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