Prado\Web\THttpRequest::constructUrl PHP Method

constructUrl() public method

The actual construction work is done by the URL manager module. This method may append session information to the generated URL if needed. You may provide your own URL manager module by setting {@link setUrlManager UrlManager} to provide your own URL scheme. Note, the constructed URL does not contain the protocol and hostname part. You may obtain an absolute URL by prepending the constructed URL with {@link getBaseUrl BaseUrl}.
See also: TUrlManager::constructUrl
public constructUrl ( $serviceID, $serviceParam, $getItems = null, $encodeAmpersand = true, $encodeGetItems = true ) : string
return string URL
    public function constructUrl($serviceID, $serviceParam, $getItems = null, $encodeAmpersand = true, $encodeGetItems = true)
    {
        if ($this->_cookieOnly === null) {
            $this->_cookieOnly = (int) ini_get('session.use_cookies') && (int) ini_get('session.use_only_cookies');
        }
        $url = $this->getUrlManagerModule()->constructUrl($serviceID, $serviceParam, $getItems, $encodeAmpersand, $encodeGetItems);
        if (defined('SID') && SID != '' && !$this->_cookieOnly) {
            return $url . (strpos($url, '?') === false ? '?' : ($encodeAmpersand ? '&' : '&')) . SID;
        } else {
            return $url;
        }
    }