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


PHP Request::getRequestArrayFromString方法代碼示例

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


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

示例1: redirectToPaypal

 /**
  * Redirects the user to a paypal so they can donate to Piwik.
  */
 public function redirectToPaypal()
 {
     $parameters = Request::getRequestArrayFromString($request = null);
     foreach ($parameters as $name => $param) {
         if ($name == 'idSite' || $name == 'module' || $name == 'action') {
             unset($parameters[$name]);
         }
     }
     $url = "https://www.paypal.com/cgi-bin/webscr?" . Url::getQueryStringFromParameters($parameters);
     Url::redirectToUrl($url);
     exit;
 }
開發者ID:pombredanne,項目名稱:ArcherSys,代碼行數:15,代碼來源:Controller.php

示例2: applyGenericFilters

 /**
  * Second, generic filters (Sort, Limit, Replace Column Names, etc.)
  */
 private function applyGenericFilters()
 {
     $requestArray = $this->request->getRequestArray();
     $request = \Piwik\API\Request::getRequestArrayFromString($requestArray);
     if (false === $this->config->enable_sort) {
         $request['filter_sort_column'] = '';
         $request['filter_sort_order'] = '';
     }
     $genericFilter = new \Piwik\API\DataTableGenericFilter($request);
     $genericFilter->filter($this->dataTable);
 }
開發者ID:brienomatty,項目名稱:elmsln,代碼行數:14,代碼來源:Visualization.php

示例3: getBulkRequest

 /**
  * Performs multiple API requests at once and returns every result.
  *
  * @param array $urls The array of API requests.
  * @return array
  */
 public function getBulkRequest($urls)
 {
     if (empty($urls)) {
         return array();
     }
     $urls = array_map('urldecode', $urls);
     $urls = array_map(array('Piwik\\Common', 'unsanitizeInputValue'), $urls);
     $result = array();
     foreach ($urls as $url) {
         $params = Request::getRequestArrayFromString($url . '&format=php&serialize=0');
         if (isset($params['urls']) && $params['urls'] == $urls) {
             // by default 'urls' is added to $params as Request::getRequestArrayFromString adds all $_GET/$_POST
             // default parameters
             unset($params['urls']);
         }
         if (!empty($params['segment']) && strpos($url, 'segment=') > -1) {
             // only unsanitize input when segment is actually present in URL, not when it was used from
             // $defaultRequest in Request::getRequestArrayFromString from $_GET/$_POST
             $params['segment'] = urlencode(Common::unsanitizeInputValue($params['segment']));
         }
         $req = new Request($params);
         $result[] = $req->process();
     }
     return $result;
 }
開發者ID:piwik,項目名稱:piwik,代碼行數:31,代碼來源:API.php


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