當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。