當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Archive::createDataTableFromArchive方法代碼示例

本文整理匯總了PHP中Piwik\Archive::createDataTableFromArchive方法的典型用法代碼示例。如果您正苦於以下問題:PHP Archive::createDataTableFromArchive方法的具體用法?PHP Archive::createDataTableFromArchive怎麽用?PHP Archive::createDataTableFromArchive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Piwik\Archive的用法示例。


在下文中一共展示了Archive::createDataTableFromArchive方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getDataTable

 /**
  * @param int $idSite
  * @param string $period
  * @param Date $date
  * @param string $segment
  * @param bool $expanded
  * @param int $idSubtable
  *
  * @return DataTable|DataTable\Map
  */
 protected function getDataTable($idSite, $period, $date, $segment, $expanded, $flat, $idSubtable)
 {
     $dataTable = Archive::createDataTableFromArchive(Archiver::CUSTOM_VARIABLE_RECORD_NAME, $idSite, $period, $date, $segment, $expanded, $flat, $idSubtable);
     $dataTable->queueFilter('ColumnDelete', 'nb_uniq_visitors');
     if ($flat) {
         $dataTable->filterSubtables('Sort', array(Metrics::INDEX_NB_ACTIONS, 'desc', $naturalSort = false, $expanded));
         $dataTable->queueFilterSubtables('ColumnDelete', 'nb_uniq_visitors');
     }
     return $dataTable;
 }
開發者ID:drabberhorizon,項目名稱:ActiveNative,代碼行數:20,代碼來源:API.php

示例2: getDataTable

 private function getDataTable($name, $idSite, $period, $date, $segment, $expanded, $idSubtable)
 {
     Piwik::checkUserHasViewAccess($idSite);
     $recordName = Dimensions::getRecordNameForAction($name);
     $dataTable = Archive::createDataTableFromArchive($recordName, $idSite, $period, $date, $segment, $expanded, $flat = false, $idSubtable);
     if (empty($idSubtable)) {
         $dataTable->filter('AddSegmentValue', array(function ($label) {
             if ($label === Archiver::CONTENT_PIECE_NOT_SET) {
                 return false;
             }
             return $label;
         }));
     }
     $this->filterDataTable($dataTable);
     return $dataTable;
 }
開發者ID:piwik,項目名稱:piwik,代碼行數:16,代碼來源:API.php

示例3: getCustomDimension

 /**
  * Fetch a report for the given idDimension. Only reports for active dimensions can be fetched. Requires at least
  * view access.
  *
  * @param int $idDimension
  * @param int $idSite
  * @param string $period
  * @param string $date
  * @param bool|false $segment
  * @param bool|false $expanded
  * @param bool|false $flat
  * @param int|null   $idSubtable
  * @return DataTable|DataTable\Map
  * @throws \Exception
  */
 public function getCustomDimension($idDimension, $idSite, $period, $date, $segment = false, $expanded = false, $flat = false, $idSubtable = null)
 {
     Piwik::checkUserHasViewAccess($idSite);
     $dimension = new Dimension($idDimension, $idSite);
     $dimension->checkActive();
     $record = Archiver::buildRecordNameForCustomDimensionId($idDimension);
     $dataTable = Archive::createDataTableFromArchive($record, $idSite, $period, $date, $segment, $expanded, $flat, $idSubtable);
     if (isset($idSubtable) && $dataTable->getRowsCount()) {
         $parentTable = Archive::createDataTableFromArchive($record, $idSite, $period, $date, $segment);
         foreach ($parentTable->getRows() as $row) {
             if ($row->getIdSubDataTable() == $idSubtable) {
                 $parentValue = $row->getColumn('label');
                 $dataTable->queueFilter('Piwik\\Plugins\\CustomDimensions\\DataTable\\Filter\\AddSubtableSegmentMetadata', array($idDimension, $parentValue));
                 break;
             }
         }
     } else {
         $dataTable->queueFilter('Piwik\\Plugins\\CustomDimensions\\DataTable\\Filter\\AddSegmentMetadata', array($idDimension));
     }
     $dataTable->filter('Piwik\\Plugins\\CustomDimensions\\DataTable\\Filter\\RemoveUserIfNeeded', array($idSite, $period, $date));
     return $dataTable;
 }
開發者ID:ep123,項目名稱:plugin-CustomDimensions,代碼行數:37,代碼來源:API.php

示例4: buildExpandedTableForFlattenGetSocials

 /**
  * @param int $idSite
  * @param string $period
  * @param string $date
  * @param string|false $segment
  * @param bool $expanded
  * @param DataTable $dataTable
  */
 private function buildExpandedTableForFlattenGetSocials($idSite, $period, $date, $segment, $expanded, $dataTable)
 {
     $urlsTable = Archive::createDataTableFromArchive(Archiver::WEBSITES_RECORD_NAME, $idSite, $period, $date, $segment, $expanded, $flat = true);
     $urlsTable->filter('ColumnCallbackDeleteRow', array('label', function ($url) {
         return !Social::getInstance()->isSocialUrl($url);
     }));
     $urlsTable = $urlsTable->mergeSubtables();
     foreach ($dataTable->getRows() as $row) {
         $row->removeSubtable();
         $social = $row->getColumn('label');
         $newTable = $urlsTable->getEmptyClone();
         $rows = $urlsTable->getRows();
         foreach ($rows as $id => $urlsTableRow) {
             $url = $urlsTableRow->getColumn('label');
             if (Social::getInstance()->isSocialUrl($url, $social)) {
                 $newTable->addRow($urlsTableRow);
                 $urlsTable->deleteRow($id);
             }
         }
         if ($newTable->getRowsCount()) {
             $newTable->filter('Piwik\\Plugins\\Referrers\\DataTable\\Filter\\UrlsForSocial', array($expanded));
             $row->setSubtable($newTable);
         }
     }
     Common::destroy($urlsTable);
     $urlsTable = null;
 }
開發者ID:dorelljames,項目名稱:piwik,代碼行數:35,代碼來源:API.php

示例5: getDataTable

 protected function getDataTable($name, $idSite, $period, $date, $segment, $expanded = false, $idSubtable = null, $secondaryDimension = false, $flat = false)
 {
     Piwik::checkUserHasViewAccess($idSite);
     $this->checkSecondaryDimension($name, $secondaryDimension);
     $recordName = $this->getRecordNameForAction($name, $secondaryDimension);
     $dataTable = Archive::createDataTableFromArchive($recordName, $idSite, $period, $date, $segment, $expanded, $flat, $idSubtable);
     if ($flat) {
         $dataTable->filterSubtables('Piwik\\Plugins\\Events\\DataTable\\Filter\\ReplaceEventNameNotSet');
     } else {
         $dataTable->filter('AddSegmentValue', array(function ($label) {
             if ($label === Archiver::EVENT_NAME_NOT_SET) {
                 return false;
             }
             return $label;
         }));
     }
     $dataTable->filter('Piwik\\Plugins\\Events\\DataTable\\Filter\\ReplaceEventNameNotSet');
     return $dataTable;
 }
開發者ID:FluentDevelopment,項目名稱:piwik,代碼行數:19,代碼來源:API.php

示例6: getDataTable

 /**
  * Function for returning a data table based on the passed selection
  * Used to generate the reports for all utm parameters
  * @param  string       $name       
  * @param  int          $idSite     
  * @param  string       $period     
  * @param  string|Date  $date       
  * @param  string       $segment    
  * @param  boolean      $expanded   
  * @param  int|null     $idSubtable 
  * @return DataTable
  */
 private function getDataTable($name, $idSite, $period, $date, $segment, $expanded = false, $idSubtable = null)
 {
     Piwik::checkUserHasViewAccess($idSite);
     $dataTable = Archive::createDataTableFromArchive($name, $idSite, $period, $date, $segment, $expanded, $idSubtable);
     return $dataTable;
 }
開發者ID:adevait,項目名稱:CampaignDetailed,代碼行數:18,代碼來源:API.php

示例7: getSiteSearchKeywordsRaw

 protected function getSiteSearchKeywordsRaw($idSite, $period, $date, $segment)
 {
     $dataTable = Archive::createDataTableFromArchive('Actions_sitesearch', $idSite, $period, $date, $segment, $expanded = false);
     return $dataTable;
 }
開發者ID:FluentDevelopment,項目名稱:piwik,代碼行數:5,代碼來源:API.php


注:本文中的Piwik\Archive::createDataTableFromArchive方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。