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


PHP Request::getParams方法代碼示例

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


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

示例1: getUrlOverrideValueIfAllowed

 protected function getUrlOverrideValueIfAllowed($urlParamToOverride, Request $request)
 {
     if (!$request->isAuthenticated()) {
         return false;
     }
     $value = Common::getRequestVar($urlParamToOverride, false, 'string', $request->getParams());
     if (!empty($value)) {
         return $value;
     }
     return false;
 }
開發者ID:josl,項目名稱:CGE-File-Sharing,代碼行數:11,代碼來源:Base.php

示例2: onNewAction

 /**
  * This event is triggered before a new action is logged to the log_link_visit_action table. It overwrites any
  * looked up action so it makes usually no sense to implement both methods but it sometimes does. You can assign
  * any value to the column or return boolan false in case you do not want to save any value.
  *
  * @param Request $request
  * @param Visitor $visitor
  * @param Action $action
  *
  * @return mixed|false
  */
 public function onNewAction(Request $request, Visitor $visitor, Action $action)
 {
     if (!$action instanceof ActionPageview) {
         // save value only in case it is a page view.
         return false;
     }
     $value = Common::getRequestVar('my_page_keywords', false, 'string', $request->getParams());
     if (false === $value) {
         return $value;
     }
     $value = trim($value);
     return substr($value, 0, 255);
 }
開發者ID:FluentDevelopment,項目名稱:piwik,代碼行數:24,代碼來源:ExampleActionDimension.php

示例3: onNewVisit

 /**
  * @param Request $request
  * @param Visitor $visitor
  * @param Action|null $action
  * @return mixed
  */
 public function onNewVisit(Request $request, Visitor $visitor, $action)
 {
     return Common::getRequestVar('fla', 0, 'int', $request->getParams());
 }
開發者ID:a4tunado,項目名稱:piwik,代碼行數:10,代碼來源:PluginFlash.php

示例4: onEcommerceCartUpdateConversion

 /**
  * This event is triggered when an ecommerce cart update is converted. In this example we would store a
  * the value of the tracking url parameter "myCustomParam" in the "example_conversion_dimension" column.
  * Return boolean false if you do not want to change the value in some cases. If you do not want to perform any
  * action on an ecommerce order at all it is recommended to just remove this method.
  *
  * @param Request $request
  * @param Visitor $visitor
  * @param Action|null $action
  * @param GoalManager $goalManager
  *
  * @return mixed|false
  */
 public function onEcommerceCartUpdateConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
 {
     return Common::getRequestVar('myCustomParam', $default = false, 'int', $request->getParams());
 }
開發者ID:piwik,項目名稱:piwik,代碼行數:17,代碼來源:ExampleConversionDimension.php


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