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 ( $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
 preQuery (&$tables, &$fields, &$conds, &$type, &$options, &$joins, $start, $end)
 Query details that the graph must fill.
 
 getTimestamp ( $row)
 Return the timestamp associated with this result row.
 

Static Protected Member Functions

static makeTimeCondition ( $field, $start, $end)
 
static namespacesFromGroups ( $groupIds)
 

Protected Attributes

 $opts
 

Detailed Description

Provides some hand default implementations for TranslationStatsInterface.

@license GPL-2.0-or-later

Since
2010.07

Definition at line 14 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()
Returns
string

Implements MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface.

Definition at line 30 of file TranslationStatsBase.php.

◆ indexOf()

MediaWiki\Extension\Translate\Statistics\TranslationStatsBase::indexOf ( $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|false

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.

◆ makeTimeCondition()

static MediaWiki\Extension\Translate\Statistics\TranslationStatsBase::makeTimeCondition ( $field,
$start,
$end )
staticprotected

Definition at line 46 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 65 of file TranslationStatsBase.php.

Member Data Documentation

◆ $opts

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: