Descendants should implement the {@link aggregateDayReport()} and {@link aggregateMultipleReports()} methods. Both of these methods should persist analytics data using the {@link \Piwik\ArchiveProcessor} instance returned by {@link getProcessor()}. The {@link aggregateDayReport()} method should compute analytics data using the {@link \Piwik\DataAccess\LogAggregator} instance returned by {@link getLogAggregator()}. ### Examples **Extending Archiver** class MyArchiver extends Archiver { public function aggregateDayReport() { $logAggregator = $this->getLogAggregator(); $data = $logAggregator->queryVisitsByDimension(...); $dataTable = new DataTable(); $dataTable->addRowsFromSimpleArray($data); $archiveProcessor = $this->getProcessor(); $archiveProcessor->insertBlobRecords('MyPlugin_myReport', $dataTable->getSerialized(500)); } public function aggregateMultipleReports() { $archiveProcessor = $this->getProcessor(); $archiveProcessor->aggregateDataTableRecords('MyPlugin_myReport', 500); } }
コード例 #1
0
 function __construct($processor)
 {
     parent::__construct($processor);
     $this->processor = $processor;
     $this->maximumRowsInDataTableLevelZero = Config::getInstance()->General['datatable_archiving_maximum_rows_custom_variables'];
     $this->maximumRowsInSubDataTable = Config::getInstance()->General['datatable_archiving_maximum_rows_subtable_custom_variables'];
 }
コード例 #2
0
ファイル: Archiver.php プロジェクト: FluentDevelopment/piwik
 public function __construct($processor)
 {
     parent::__construct($processor);
     $this->columnToSortByBeforeTruncation = Metrics::INDEX_NB_VISITS;
     $this->maximumRowsInDataTable = ArchivingHelper::$maximumRowsInDataTableLevelZero;
     $this->maximumRowsInSubDataTable = ArchivingHelper::$maximumRowsInSubDataTable;
 }
コード例 #3
0
ファイル: Archiver.php プロジェクト: piwik/piwik
 function __construct($processor)
 {
     parent::__construct($processor);
     $this->columnToSortByBeforeTruncation = Metrics::INDEX_NB_VISITS;
     $this->maximumRowsInDataTable = Config::getInstance()->General['datatable_archiving_maximum_rows_events'];
     $this->maximumRowsInSubDataTable = Config::getInstance()->General['datatable_archiving_maximum_rows_subtable_events'];
 }
コード例 #4
0
ファイル: Archiver.php プロジェクト: TensorWrenchOSS/piwik
 function __construct($processor)
 {
     parent::__construct($processor);
     if ($processor->getParams()->getSite()->isEcommerceEnabled()) {
         $this->maximumRowsInDataTableLevelZero = self::MAX_ROWS_WHEN_ECOMMERCE;
         $this->maximumRowsInSubDataTable = self::MAX_ROWS_WHEN_ECOMMERCE;
     } else {
         $this->maximumRowsInDataTableLevelZero = Config::getInstance()->General['datatable_archiving_maximum_rows_custom_variables'];
         $this->maximumRowsInSubDataTable = Config::getInstance()->General['datatable_archiving_maximum_rows_subtable_custom_variables'];
     }
 }
コード例 #5
0
ファイル: Archiver.php プロジェクト: adevait/CampaignDetailed
 public function __construct($processor)
 {
     parent::__construct($processor);
     $this->columnToSortByBeforeTruncation = Metrics::INDEX_NB_VISITS;
     $this->maximumRowsInDataTableLevelZero = @Config::getInstance()->General['datatable_archiving_maximum_rows_referers'];
     $this->maximumRowsInSubDataTable = @Config::getInstance()->General['datatable_archiving_maximum_rows_subtable_referers'];
     if (empty($this->maximumRowsInDataTableLevelZero)) {
         $this->maximumRowsInDataTableLevelZero = Config::getInstance()->General['datatable_archiving_maximum_rows_referrers'];
         $this->maximumRowsInSubDataTable = Config::getInstance()->General['datatable_archiving_maximum_rows_subtable_referrers'];
     }
 }
コード例 #6
0
ファイル: Archiver.php プロジェクト: carriercomm/piwik
 function __construct($processor)
 {
     parent::__construct($processor);
     $this->isSiteSearchEnabled = $processor->getParams()->getSite()->isSiteSearchEnabled();
 }
コード例 #7
0
ファイル: Archiver.php プロジェクト: diosmosis/piwik
 function __construct($processor)
 {
     parent::__construct($processor);
     $this->maximumRowsInDataTableLevelZero = Config::getInstance()->General['datatable_archiving_maximum_rows_userid_users'];
 }