当前位置: 首页>>代码示例>>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;未经允许,请勿转载。