Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
TranslationStatsInterface.php
1<?php
2declare( strict_types = 1 );
3
4namespace MediaWiki\Extension\Translate\Statistics;
5
6use stdClass;
7use Wikimedia\Rdbms\IReadableDatabase;
8use Wikimedia\Rdbms\SelectQueryBuilder;
9
24 public function __construct( TranslationStatsGraphOptions $opts );
25
33 public function createQueryBuilder( IReadableDatabase $database, string $caller ): SelectQueryBuilder;
34
41 public function indexOf( stdClass $row ): ?array;
42
49 public function labels(): array;
50
52 public function getTimestampColumn(): string;
53
58 public function getDateFormat(): string;
59}
indexOf(stdClass $row)
Return the indexes which this result contributes to.
__construct(TranslationStatsGraphOptions $opts)
Constructor.
labels()
Return the names of the variables being measured.
createQueryBuilder(IReadableDatabase $database, string $caller)
Return the SelectQueryBuilder to fetch the data needed for the graph.
getTimestampColumn()
Return the name of the timestamp column to be queried.