cache = $cache; $this->categoryManager = $categoryManager; $this->databaseFactory = $databaseFactory; } /** * Add totals to output */ public function execute() { $totalsLookup = new TotalsLookup( $this->categoryManager, $this->cache, $this->databaseFactory->newDatabase( 0 ) ); $totals = $totalsLookup->getTotals(); ApiResult::setArrayType( $totals, 'assoc' ); $this->getResult()->addValue( [ 'query', 'linterstats' ], 'totals', $totals ); } /** @inheritDoc */ public function getExamplesMessages() { return [ 'action=query&meta=linterstats' => 'apihelp-query+linterstats-example-1', ]; } }