本文整理匯總了PHP中Uri::url方法的典型用法代碼示例。如果您正苦於以下問題:PHP Uri::url方法的具體用法?PHP Uri::url怎麽用?PHP Uri::url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Uri
的用法示例。
在下文中一共展示了Uri::url方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: get_secret_url
/**
* Returns the url used to access the rss for a specific user.
* Note that the url is protected by token
*
* @return string
*/
public function get_secret_url($action = 'display', $format = 'rss')
{
$user_id = $this->get_user_id();
$token = $this->ensure_user_token();
$params = array('user_id' => $user_id, 'token' => $token, 'format' => $format, 'action' => $action);
return Uri::url('main/course_notice/index.php', $params);
}
示例2: format_calendar_event
protected function format_calendar_event($result, $item)
{
$params = Uri::course_params($item->code, $item->session_id, $item->to_group_id);
// . 'calendar/agenda.php?cidReq=' . $item->code . '#' . $item->id;
$result->link = Uri::url('main/calendar/agenda.php', $params);
//$result->description .= '<br/><i>' . $course->title . ' > ' . get_lang('Agenda') . ' > ' . $item->title . '</i>';
}
示例3: url
/**
* Returns a full url from local/absolute path and parameters.
* Append the root as required for relative urls.
*
* @param string $path
* @param array $params
* @return string
*/
public static function url($path = '', $params = array(), $html = true)
{
return Uri::url($path, $params, $html);
}
示例4: download_url
/**
* Returns a temporary url to download files and/or folders.
*
* @param string|array $ids
* @return string
*/
public static function download_url($ids, $tool)
{
$ids = is_array($ids) ? implode(',', $ids) : $ids;
$params = Uri::course_params();
$params['id'] = $ids;
$params[KeyAuth::PARAM_ACCESS_TOKEN] = KeyAuth::create_temp_token();
$result = Uri::url("/main/$tool/file.php", $params, false);
return $result;
}