Interface for producing different kinds of graphs. 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. | |
getDateFormat () | |
Return time formatting string. |
Interface for producing different kinds of graphs.
The graphs are based on data queried from the database.
Definition at line 692 of file SpecialTranslationStats.php.
TranslationStatsInterface::__construct | ( | FormOptions $ | opts | ) |
Constructor.
The implementation can access the graph options, but not define new ones.
FormOptions | $opts |
Implemented in TranslationStatsBase, and TranslatePerLanguageStats.
TranslationStatsInterface::getDateFormat | ( | ) |
Return time formatting string.
Implemented in TranslationStatsBase.
TranslationStatsInterface::getTimestamp | ( | $ | row | ) |
Return the timestamp associated with this result row.
array | $row Database Result Row |
Implemented in TranslatePerLanguageStats, TranslateRegistrationStats, and ReviewPerLanguageStats.
TranslationStatsInterface::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 |
Implemented in TranslationStatsBase, TranslatePerLanguageStats, and ReviewPerLanguageStats.
TranslationStatsInterface::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.
Implemented in TranslationStatsBase, TranslatePerLanguageStats, and ReviewPerLanguageStats.
TranslationStatsInterface::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 |
Implemented in TranslatePerLanguageStats, TranslateRegistrationStats, and ReviewPerLanguageStats.