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

Provides some hand default implementations for TranslationStatsInterface. More...

Inheritance diagram for MediaWiki\Extension\Translate\Statistics\TranslationStatsBase:
MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats MediaWiki\Extension\Translate\Statistics\TranslateRegistrationStats MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats

Public Member Functions

 __construct (TranslationStatsGraphOptions $opts)
 Constructor.
 
 indexOf (stdClass $row)
 Return the indexes which this result contributes to.
 
 labels ()
 Return the names of the variables being measured.
 
 getDateFormat ()
 Return time formatting string.
 
- Public Member Functions inherited from MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface
 createQueryBuilder (IReadableDatabase $database, string $caller)
 Return the SelectQueryBuilder to fetch the data needed for the graph.
 
 getTimestampColumn ()
 Return the name of the timestamp column to be queried.
 

Static Protected Member Functions

static namespacesFromGroups ( $groupIds)
 

Protected Attributes

TranslationStatsGraphOptions $opts
 

Detailed Description

Provides some hand default implementations for TranslationStatsInterface.

@license GPL-2.0-or-later

Since
2010.07

Definition at line 15 of file TranslationStatsBase.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\Statistics\TranslationStatsBase::__construct ( TranslationStatsGraphOptions $opts)

Constructor.

The implementation can access the graph options, but not define new ones.

Parameters
TranslationStatsGraphOptions$opts

Implements MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface.

Reimplemented in MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats.

Definition at line 18 of file TranslationStatsBase.php.

Member Function Documentation

◆ getDateFormat()

MediaWiki\Extension\Translate\Statistics\TranslationStatsBase::getDateFormat ( )

Return time formatting string.

See also
Language::sprintfDate()

Implements MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface.

Definition at line 30 of file TranslationStatsBase.php.

◆ indexOf()

MediaWiki\Extension\Translate\Statistics\TranslationStatsBase::indexOf ( stdClass $row)

Return the indexes which this result contributes to.

Return 'all' if only one variable is measured. Return false if none.

Parameters
stdClass$rowDatabase Result Row
Returns
?array

Implements MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface.

Reimplemented in MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats, and MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats.

Definition at line 22 of file TranslationStatsBase.php.

◆ labels()

MediaWiki\Extension\Translate\Statistics\TranslationStatsBase::labels ( )

Return the names of the variables being measured.

Return 'all' if only one variable is measured. Must match indexes returned by indexOf() and contain them all.

Returns
string[]

Implements MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface.

Reimplemented in MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats, and MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats.

Definition at line 26 of file TranslationStatsBase.php.

◆ namespacesFromGroups()

static MediaWiki\Extension\Translate\Statistics\TranslationStatsBase::namespacesFromGroups ( $groupIds)
staticprotected
Since
2012-03-05
Parameters
array$groupIds
Returns
array

Definition at line 51 of file TranslationStatsBase.php.

Member Data Documentation

◆ $opts

TranslationStatsGraphOptions MediaWiki\Extension\Translate\Statistics\TranslationStatsBase::$opts
protected

Definition at line 16 of file TranslationStatsBase.php.


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