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


PHP Piwik_API_Request::getRequestArrayFromString方法代碼示例

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


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

示例1: postDataTableLoadedFromAPI

 /**
  * Hook called after the dataTable has been loaded from the API
  * Can be used to add, delete or modify the data freshly loaded
  */
 protected function postDataTableLoadedFromAPI()
 {
     if (empty($this->dataTable)) {
         return false;
     }
     // First, filters that delete rows
     foreach ($this->queuedFiltersPriority as $filter) {
         $filterName = $filter[0];
         $filterParameters = $filter[1];
         $this->dataTable->filter($filterName, $filterParameters);
     }
     if (0 == Piwik_Common::getRequestVar('disable_generic_filters', '0', 'string')) {
         // Second, generic filters (Sort, Limit, Replace Column Names, etc.)
         $requestString = $this->getRequestString();
         $request = Piwik_API_Request::getRequestArrayFromString($requestString);
         if (!empty($this->variablesDefault['enable_sort']) && $this->variablesDefault['enable_sort'] === 'false') {
             $request['filter_sort_column'] = $request['filter_sort_order'] = '';
         }
         $genericFilter = new Piwik_API_DataTableGenericFilter($request);
         $genericFilter->filter($this->dataTable);
     }
     // Finally, apply datatable filters that were queued (should be 'presentation' filters that do not affect the number of rows)
     foreach ($this->queuedFilters as $filter) {
         $filterName = $filter[0];
         $filterParameters = $filter[1];
         $this->dataTable->filter($filterName, $filterParameters);
     }
 }
開發者ID:neolf,項目名稱:PIWIK4MOBILE,代碼行數:32,代碼來源:ViewDataTable.php

示例2: postDataTableLoadedFromAPI

 /**
  * Hook called after the dataTable has been loaded from the API
  * Can be used to add, delete or modify the data freshly loaded
  * 
  * @return bool
  */
 protected function postDataTableLoadedFromAPI()
 {
     if (empty($this->dataTable)) {
         return false;
     }
     // deal w/ table metadata
     if ($this->dataTable instanceof Piwik_DataTable) {
         $this->viewProperties['metadata'] = $this->dataTable->getAllTableMetadata();
         if (isset($this->viewProperties['metadata'][Piwik_DataTable::ARCHIVED_DATE_METADATA_NAME])) {
             $this->viewProperties['metadata'][Piwik_DataTable::ARCHIVED_DATE_METADATA_NAME] = $this->makePrettyArchivedOnText();
         }
     }
     // First, filters that delete rows
     foreach ($this->queuedFiltersPriority as $filter) {
         $filterName = $filter[0];
         $filterParameters = $filter[1];
         $this->dataTable->filter($filterName, $filterParameters);
     }
     if (!$this->areGenericFiltersDisabled()) {
         // Second, generic filters (Sort, Limit, Replace Column Names, etc.)
         $requestString = $this->getRequestString();
         $request = Piwik_API_Request::getRequestArrayFromString($requestString);
         if (!empty($this->variablesDefault['enable_sort']) && $this->variablesDefault['enable_sort'] === 'false') {
             $request['filter_sort_column'] = $request['filter_sort_order'] = '';
         }
         $genericFilter = new Piwik_API_DataTableGenericFilter($request);
         $genericFilter->filter($this->dataTable);
     }
     if (!$this->areQueuedFiltersDisabled()) {
         // Finally, apply datatable filters that were queued (should be 'presentation' filters that
         // do not affect the number of rows)
         foreach ($this->queuedFilters as $filter) {
             $filterName = $filter[0];
             $filterParameters = $filter[1];
             $this->dataTable->filter($filterName, $filterParameters);
         }
     }
     return true;
 }
開發者ID:nomoto-ubicast,項目名稱:piwik,代碼行數:45,代碼來源:ViewDataTable.php


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