Graph which provides statistics on active users and number of translations. More...
Public Member Functions | |
__construct (TranslationStatsGraphOptions $opts) | |
Constructor. | |
preQuery (IDatabase $database, &$tables, &$fields, &$conds, &$type, &$options, &$joins, $start, $end) | |
Query details that the graph must fill. | |
indexOf ( $row) | |
Return the indexes which this result contributes to. | |
labels () | |
Return the names of the variables being measured. | |
getTimestamp ( $row) | |
Return the timestamp associated with this result row. | |
Public Member Functions inherited from MediaWiki\Extension\Translate\Statistics\TranslationStatsBase | |
getDateFormat () | |
Return time formatting string. | |
Protected Member Functions | |
makeLabel ( $group, $code) | |
Makes a label for variable. | |
combineTwoArrays ( $groups, $codes) | |
Cross-product of two lists with string results, where either list can be empty. | |
formatTimestamp ( $timestamp) | |
Returns unique index for given item in the scale being used. | |
Protected Attributes | |
array | $seenUsers = [] |
array | $groups = [] |
MessageIndex | $messageIndex |
Protected Attributes inherited from MediaWiki\Extension\Translate\Statistics\TranslationStatsBase | |
TranslationStatsGraphOptions | $opts |
Additional Inherited Members | |
Static Protected Member Functions inherited from MediaWiki\Extension\Translate\Statistics\TranslationStatsBase | |
static | makeTimeCondition (IDatabase $database, $field, $start, $end) |
static | namespacesFromGroups ( $groupIds) |
Graph which provides statistics on active users and number of translations.
@license GPL-2.0-or-later
Definition at line 20 of file TranslatePerLanguageStats.php.
MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats::__construct | ( | TranslationStatsGraphOptions | $opts | ) |
Constructor.
The implementation can access the graph options, but not define new ones.
TranslationStatsGraphOptions | $opts |
Reimplemented from MediaWiki\Extension\Translate\Statistics\TranslationStatsBase.
Definition at line 28 of file TranslatePerLanguageStats.php.
|
protected |
Cross-product of two lists with string results, where either list can be empty.
string[] | $groups | Group names. |
string[] | $codes | Language codes. |
Definition at line 164 of file TranslatePerLanguageStats.php.
|
protected |
Returns unique index for given item in the scale being used.
Called a lot, so performance intensive.
string | $timestamp | Timestamp in mediawiki format. |
Definition at line 189 of file TranslatePerLanguageStats.php.
MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats::getTimestamp | ( | $row | ) |
Return the timestamp associated with this result row.
stdClass | $row | Database Result Row |
Implements MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface.
Reimplemented in MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats.
Definition at line 138 of file TranslatePerLanguageStats.php.
MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats::indexOf | ( | $row | ) |
Return the indexes which this result contributes to.
Return 'all' if only one variable is measured. Return false if none.
stdClass | $row | Database Result Row |
Reimplemented from MediaWiki\Extension\Translate\Statistics\TranslationStatsBase.
Reimplemented in MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats.
Definition at line 93 of file TranslatePerLanguageStats.php.
MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats::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.
Reimplemented from MediaWiki\Extension\Translate\Statistics\TranslationStatsBase.
Reimplemented in MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats.
Definition at line 134 of file TranslatePerLanguageStats.php.
|
protected |
Makes a label for variable.
If group or language code filters, or both are used, combine those in a pretty way.
string | $group | Group name. |
string | $code | Language code. |
Definition at line 149 of file TranslatePerLanguageStats.php.
MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats::preQuery | ( | IDatabase | $database, |
& | $tables, | ||
& | $fields, | ||
& | $conds, | ||
& | $type, | ||
& | $options, | ||
& | $joins, | ||
$start, | |||
$end ) |
Query details that the graph must fill.
IDatabase | $database | |
array | &$tables | Empty list. Append table names. |
array | &$fields | Empty list. Append field names. |
array | &$conds | Empty array. Append select conditions. |
string | &$type | Append graph type (used to identify queries). |
array | &$options | Empty array. Append extra query options. |
array | &$joins | Empty array. Append extra join conditions. |
string | $start | Precalculated start cutoff timestamp |
string | null | $end | Precalculated end cutoff timestamp |
Implements MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface.
Reimplemented in MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats.
Definition at line 37 of file TranslatePerLanguageStats.php.
|
protected |
Definition at line 23 of file TranslatePerLanguageStats.php.
|
protected |
Definition at line 26 of file TranslatePerLanguageStats.php.
|
protected |
Definition at line 22 of file TranslatePerLanguageStats.php.