web\UrlManager createAbsoluteUrl()

createAbsoluteUrl() public method

Creates an absolute URL using the given route and query parameters.

This method prepends the URL created by createUrl() with the $hostInfo.

Note that unlike yii\helpers\Url::toRoute(), this method always treats the given route as an absolute route.

See also createUrl().

public string createAbsoluteUrl ( $params, $scheme = null )
$params string|array

Use a string to represent a route (e.g. site/index), or an array to represent a route with query parameters (e.g. ['site/index', 'param1' => 'value1']).

$scheme string

The scheme to use for the url (either http or https). If not specified the scheme of the current request will be used.

return string

The created URL

doc_Yii
2016-10-30 17:17:00
Comments
Leave a Comment

Please login to continue.