本文整理汇总了PHP中MUtil_Html::urlString方法的典型用法代码示例。如果您正苦于以下问题:PHP MUtil_Html::urlString方法的具体用法?PHP MUtil_Html::urlString怎么用?PHP MUtil_Html::urlString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MUtil_Html
的用法示例。
在下文中一共展示了MUtil_Html::urlString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: calculateReturnUrl
/**
* Returns the full url Gems should forward to after survey completion.
*
* This fix allows multiple sites with multiple url's to share a single
* installation.
*
* @return string
*/
protected function calculateReturnUrl()
{
$currentUri = $this->util->getCurrentURI();
/*
// Referrer would be powerful when someone is usng multiple windows, but
// the loop does not always provide a correct referrer.
$referrer = $_SERVER["HTTP_REFERER"];
// If a referrer was specified and that referral is from the current site, then use it
// as it is more dependable when the user has multiple windows open on the application.
if ($referrer && (0 == strncasecmp($referrer, $currentUri, strlen($currentUri)))) {
return $referrer;
// \MUtil_Echo::track($referrer);
} // */
// Use the survey return if available.
$surveyReturn = $this->loader->getCurrentUser()->getSurveyReturn();
if ($surveyReturn) {
// Do not show the base url as it is in $currentUri
$surveyReturn['NoBase'] = true;
// Add route reset to prevet the current parameters to be
// added to the url.
$surveyReturn['RouteReset'] = true;
// \MUtil_Echo::track($currentUri, \MUtil_Html::urlString($surveyReturn));
return $currentUri . \MUtil_Html::urlString($surveyReturn);
}
// Ultimate backup solution for return
return $currentUri . '/ask/forward/' . \MUtil_Model::REQUEST_ID . '/' . urlencode($this->getTokenId());
}