Graph which provides statistics on active users and number of translations. More...
Public Member Functions | |
__construct (FormOptions $opts) | |
Constructor. | |
preQuery (&$tables, &$fields, &$conds, &$type, &$options, $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. | |
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 | |
$usercache | |
array ( string => bool ) Cache used to count active users only once per day. | |
$codes | |
$groups |
Graph which provides statistics on active users and number of translations.
Definition at line 810 of file SpecialTranslationStats.php.
TranslatePerLanguageStats::__construct | ( | FormOptions $ | opts | ) |
Constructor.
The implementation can access the graph options, but not define new ones.
FormOptions | $opts |
Reimplemented from TranslationStatsBase.
Definition at line 816 of file SpecialTranslationStats.php.
TranslatePerLanguageStats::combineTwoArrays | ( | $ | groups, | |
$ | codes | |||
) | [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 944 of file SpecialTranslationStats.php.
Referenced by ReviewPerLanguageStats::indexOf(), indexOf(), ReviewPerLanguageStats::labels(), and labels().
TranslatePerLanguageStats::formatTimestamp | ( | $ | timestamp | ) | [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 969 of file SpecialTranslationStats.php.
Referenced by ReviewPerLanguageStats::indexOf(), and indexOf().
TranslatePerLanguageStats::getTimestamp | ( | $ | row | ) |
Return the timestamp associated with this result row.
array | $row Database Result Row |
Implements TranslationStatsInterface.
Reimplemented in ReviewPerLanguageStats.
Definition at line 918 of file SpecialTranslationStats.php.
TranslatePerLanguageStats::indexOf | ( | $ | row | ) |
Return the indexes which this result contributes to.
Return 'all' if only one variable is measured. Return false if none.
array | $row Database Result Row |
Reimplemented from TranslationStatsBase.
Reimplemented in ReviewPerLanguageStats.
Definition at line 870 of file SpecialTranslationStats.php.
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 TranslationStatsBase.
Reimplemented in ReviewPerLanguageStats.
Definition at line 914 of file SpecialTranslationStats.php.
TranslatePerLanguageStats::makeLabel | ( | $ | group, | |
$ | code | |||
) | [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 929 of file SpecialTranslationStats.php.
Referenced by combineTwoArrays().
TranslatePerLanguageStats::preQuery | ( | &$ | tables, | |
&$ | fields, | |||
&$ | conds, | |||
&$ | type, | |||
&$ | options, | |||
$ | start, | |||
$ | end | |||
) |
Query details that the graph must fill.
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. | |
string | $start Precalculated start cutoff timestamp | |
string | $end Precalculated end cutoff timestamp |
Implements TranslationStatsInterface.
Reimplemented in ReviewPerLanguageStats.
Definition at line 822 of file SpecialTranslationStats.php.
TranslatePerLanguageStats::$codes [protected] |
Definition at line 814 of file SpecialTranslationStats.php.
Referenced by combineTwoArrays(), ReviewPerLanguageStats::indexOf(), and indexOf().
TranslatePerLanguageStats::$groups [protected] |
Definition at line 814 of file SpecialTranslationStats.php.
Referenced by combineTwoArrays(), ReviewPerLanguageStats::indexOf(), and indexOf().
TranslatePerLanguageStats::$usercache [protected] |
array ( string => bool ) Cache used to count active users only once per day.
Definition at line 812 of file SpecialTranslationStats.php.