本文整理汇总了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;
}
示例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);
}
示例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());
}
示例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());
}