Interface for producing different kinds of graphs. More...
Public Member Functions | |
__construct (TranslationStatsGraphOptions $opts) | |
Constructor. | |
preQuery (&$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. | |
getDateFormat () | |
Return time formatting string. | |
Interface for producing different kinds of graphs.
The graphs are based on data queried from the database.
@license GPL-2.0-or-later
Definition at line 16 of file TranslationStatsInterface.php.
MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface::__construct | ( | TranslationStatsGraphOptions | $opts | ) |
Constructor.
The implementation can access the graph options, but not define new ones.
TranslationStatsGraphOptions | $opts |
Implemented in MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats, and MediaWiki\Extension\Translate\Statistics\TranslationStatsBase.
MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface::getDateFormat | ( | ) |
Return time formatting string.
Implemented in MediaWiki\Extension\Translate\Statistics\TranslationStatsBase.
MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface::getTimestamp | ( | $row | ) |
Return the timestamp associated with this result row.
stdClass | $row | Database Result Row |
Implemented in MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats, MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats, and MediaWiki\Extension\Translate\Statistics\TranslateRegistrationStats.
MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface::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 |
Implemented in MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats, MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats, and MediaWiki\Extension\Translate\Statistics\TranslationStatsBase.
MediaWiki\Extension\Translate\Statistics\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 MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats, MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats, and MediaWiki\Extension\Translate\Statistics\TranslationStatsBase.
MediaWiki\Extension\Translate\Statistics\TranslationStatsInterface::preQuery | ( | & | $tables, |
& | $fields, | ||
& | $conds, | ||
& | $type, | ||
& | $options, | ||
& | $joins, | ||
$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. |
array | &$joins | Empty array. Append extra join conditions. |
string | $start | Precalculated start cutoff timestamp |
string | $end | Precalculated end cutoff timestamp |
Implemented in MediaWiki\Extension\Translate\Statistics\ReviewPerLanguageStats, MediaWiki\Extension\Translate\Statistics\TranslatePerLanguageStats, and MediaWiki\Extension\Translate\Statistics\TranslateRegistrationStats.