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