Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Archiver.php « Provider « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bd9a4fa456aacc7e76c8fd46359d04c225bd45a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
 * Piwik - Open source web analytics
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 *
 * @category Piwik_Plugins
 * @package Piwik_Provider
 */
use Piwik\Metrics;
use Piwik\PluginsArchiver;

class Piwik_Provider_Archiver extends PluginsArchiver
{
    const PROVIDER_RECORD_NAME = 'Provider_hostnameExt';
    const PROVIDER_FIELD = "location_provider";

    public function archiveDay()
    {
        $metrics = $this->getProcessor()->getMetricsForDimension(self::PROVIDER_FIELD);
        $tableProvider = $this->getProcessor()->getDataTableFromDataArray($metrics);
        $this->getProcessor()->insertBlobRecord(self::PROVIDER_RECORD_NAME, $tableProvider->getSerialized($this->maximumRows, null, Metrics::INDEX_NB_VISITS));
    }

    public function archivePeriod()
    {
        $this->getProcessor()->aggregateDataTableReports(array(self::PROVIDER_RECORD_NAME), $this->maximumRows);
    }
}