src/web/UrlManager.php
public function createAbsoluteUrl($params, $scheme = null)
    {
        $params = (array) $params;
        $url = $this->createUrl($params);
        if (strpos($url, '://') === false) {
            $url = $this->getHostInfo() . $url;
        }
        if (is_string($scheme) && ($pos = strpos($url, '://')) !== false) {
            $url = $scheme . substr($url, $pos);
        }

        return $url;
    }
public function createAbsoluteUrl($params, $scheme = null)
    {
        $params = (array) $params;
        $url = $this->createUrl($params);
        if (strpos($url, '://') === false) {
            $url = $this->getHostInfo() . $url;
        }
        if (is_string($scheme) && ($pos = strpos($url, '://')) !== false) {
            $url = $scheme . substr($url, $pos);
        }

        return $url;
    }
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.

@param string|array $params 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']`).
@param string $scheme 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
@see createUrl()