当前位置: 首页>>代码示例>>PHP>>正文


PHP Report::init方法代码示例

本文整理汇总了PHP中Piwik\Plugin\Report::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Report::init方法的具体用法?PHP Report::init怎么用?PHP Report::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Piwik\Plugin\Report的用法示例。


在下文中一共展示了Report::init方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 protected function init()
 {
     parent::init();
     $this->reportsToMerge = $this->getReportsToMerge();
     $this->module = 'API';
     $this->action = 'get';
     $this->categoryId = 'API';
     $this->name = Piwik::translate('General_MainMetrics');
     $this->documentation = '';
     $this->processedMetrics = array();
     foreach ($this->reportsToMerge as $report) {
         if (!is_array($report->processedMetrics)) {
             continue;
         }
         $this->processedMetrics = array_merge($this->processedMetrics, $report->processedMetrics);
     }
     $this->metrics = array();
     foreach ($this->reportsToMerge as $report) {
         if (!is_array($report->metrics)) {
             continue;
         }
         $this->metrics = array_merge($this->metrics, $report->metrics);
     }
     $this->order = 6;
 }
开发者ID:piwik,项目名称:piwik,代码行数:25,代码来源:Get.php

示例2: init

 protected function init()
 {
     parent::init();
     $this->name = 'My Custom Report Name';
     $this->order = 20;
     $this->module = 'TestPlugin';
     $this->action = 'getBasicReport';
     $this->category = 'Goals_Goals';
 }
开发者ID:Abine,项目名称:piwik,代码行数:9,代码来源:ReportTest.php

示例3: init

 protected function init()
 {
     parent::init();
     $this->category = 'General_Visitors';
     $this->name = Piwik::translate('VisitFrequency_ColumnReturningVisits');
     $this->documentation = '';
     // TODO
     $this->processedMetrics = array(new ReturningMetric(new AverageTimeOnSite()), new ReturningMetric(new ActionsPerVisit()), new ReturningMetric(new BounceRate()));
     $this->metrics = array('nb_visits_returning', 'nb_actions_returning', 'nb_uniq_visitors_returning', 'nb_users_returning', 'max_actions_returning');
     $this->order = 40;
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:11,代码来源:Get.php

示例4: init

 protected function init()
 {
     parent::init();
     $this->category = 'General_Visitors';
     $this->name = Piwik::translate('VisitFrequency_ColumnReturningVisits');
     $this->documentation = '';
     // TODO
     $this->metrics = array('nb_visits_returning', 'nb_actions_returning', 'avg_time_on_site_returning', 'bounce_rate_returning', 'nb_actions_per_visit_returning', 'nb_uniq_visitors_returning');
     $this->processedMetrics = false;
     $this->order = 40;
 }
开发者ID:a4tunado,项目名称:piwik,代码行数:11,代码来源:Get.php

示例5: init

 protected function init()
 {
     parent::init();
     $this->category = 'VisitsSummary_VisitsSummary';
     $this->name = Piwik::translate('VisitsSummary_VisitsSummary');
     $this->documentation = '';
     // TODO
     $this->processedMetrics = array(new BounceRate(), new ActionsPerVisit(), new AverageTimeOnSite());
     $this->metrics = array('nb_uniq_visitors', 'nb_visits', $this->usersColumn, 'nb_actions', 'max_actions');
     // Used to process metrics, not displayed/used directly
     //								'sum_visit_length',
     //								'nb_visits_converted',
     $this->order = 1;
 }
开发者ID:JoeHorn,项目名称:piwik,代码行数:14,代码来源:Get.php

示例6: init

 protected function init()
 {
     parent::init();
     $this->category = 'VisitsSummary_VisitsSummary';
     $this->name = Piwik::translate('VisitsSummary_VisitsSummary');
     $this->documentation = '';
     // TODO
     $this->processedMetrics = false;
     $this->metrics = array('nb_uniq_visitors', 'nb_visits', 'nb_actions', 'nb_actions_per_visit', 'bounce_rate', 'avg_time_on_site', 'max_actions');
     // Used to process metrics, not displayed/used directly
     //								'sum_visit_length',
     //								'nb_visits_converted',
     $this->order = 1;
 }
开发者ID:emersonmatsumoto,项目名称:piwik,代码行数:14,代码来源:Get.php

示例7: init

 protected function init()
 {
     parent::init();
     $this->categoryId = 'CustomDimensions_CustomDimensions';
     $this->name = Piwik::translate($this->categoryId);
     $this->order = 100;
     $this->actionToLoadSubTables = $this->action;
     $idDimension = Common::getRequestVar('idDimension', 0, 'int');
     $idSite = Common::getRequestVar('idSite', 0, 'int');
     if ($idDimension > 0 && $idSite > 0) {
         $dimensions = $this->getActiveDimensionsForSite($idSite);
         foreach ($dimensions as $dimension) {
             if ((int) $dimension['idcustomdimension'] === $idDimension) {
                 $this->initThisReportFromDimension($dimension);
             }
         }
     }
 }
开发者ID:piwik,项目名称:plugin-CustomDimensions,代码行数:18,代码来源:GetCustomDimension.php


注:本文中的Piwik\Plugin\Report::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。