statsReadRepository = new ABJ_404_Solution_StatsReadRepository( $dbCore, $logsRepo, $logger, $refreshLock ); $this->dashboardSnapshotCache = new ABJ_404_Solution_StatsDashboardSnapshotCache( $this->statsReadRepository, $refreshLock, $logger ); $this->digestDataProvider = new ABJ_404_Solution_StatsDigestDataProvider( $dbCore, $logsRepo, $this->statsReadRepository, $logger, $dbCore->collationHelper() ); $this->contentKeywordsRepository = new ABJ_404_Solution_ContentKeywordsRepository( $dbCore, $f, $logger ); } /** @inheritDoc */ function getStatsCount($query, array $valueParams) { return $this->statsReadRepository->getStatsCount($query, $valueParams); } /** @inheritDoc */ function getPeriodicStatsSummary($sinceTimestamp, $notFoundDest = '404') { return $this->statsReadRepository->getPeriodicStatsSummary($sinceTimestamp, $notFoundDest); } /** @inheritDoc */ function getPeriodicStatsSummariesCached($notFoundDest = '404') { return $this->statsReadRepository->getPeriodicStatsSummariesCached($notFoundDest); } /** @inheritDoc */ function getStatsDashboardSnapshot($allowStale = true) { return $this->dashboardSnapshotCache->getStatsDashboardSnapshot($allowStale); } /** @inheritDoc */ function refreshStatsDashboardSnapshot($force = false) { return $this->dashboardSnapshotCache->refresh($force); } /** @inheritDoc */ function getEarliestLogTimestamp() { return $this->statsReadRepository->getEarliestLogTimestamp(); } /** @inheritDoc */ function getConfidenceBandCounts() { return $this->statsReadRepository->getConfidenceBandCounts(); } /** @inheritDoc */ function getTopCapturedForDigest(int $limit): array { return $this->digestDataProvider->getTopCapturedForDigest($limit); } /** @inheritDoc */ function buildTopCapturedForDigestQuery(int $limit): string { return $this->digestDataProvider->buildTopCapturedForDigestQuery($limit); } /** @inheritDoc */ function getDigestSummaryStats(): array { return $this->digestDataProvider->getDigestSummaryStats(array($this, 'getStatsCount')); } /** @inheritDoc */ function getCapturedCountForNotification(): int { return $this->digestDataProvider->getCapturedCountForNotification(); } /** @inheritDoc */ function getPostsNeedingContentKeywords(int $limit = 500): array { return $this->contentKeywordsRepository->getPostsNeedingContentKeywords($limit); } /** @inheritDoc */ function bulkUpdateContentKeywords(array $idToKeywords): void { $this->contentKeywordsRepository->bulkUpdateContentKeywords($idToKeywords); } }