public function setUrl($url)
    {
        $this->_rawUrl = $url;
        if (strncasecmp($url, 'http://', 7) && strncasecmp($url, 'https://', 8) && isset($_SERVER['HTTP_HOST'])) {
            if (substr($url, 0, 1) != '/') {
                $url = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/') + 1) . $url;
            }
            $url = 'http://' . $_SERVER['HTTP_HOST'] . $url;
        }
        $this->_url = str_replace('&amp;', '&', $url);
        $this->_urlParams = null;
    }
public function setUrl($url)
    {
        $this->_rawUrl = $url;
        if (strncasecmp($url, 'http://', 7) && strncasecmp($url, 'https://', 8) && isset($_SERVER['HTTP_HOST'])) {
            if (substr($url, 0, 1) != '/') {
                $url = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/') + 1) . $url;
            }
            $url = 'http://' . $_SERVER['HTTP_HOST'] . $url;
        }
        $this->_url = str_replace('&amp;', '&', $url);
        $this->_urlParams = null;
    }
public function setUrl ( $ url ) { $ this -> _rawUrl = $ url ; if ( strncasecmp ( $ url , 'http://' , 7 ) && strncasecmp ( $ url , 'https://' , 8 ) && isset ( $ _SERVER [ 'HTTP_HOST' ] ) ) { if ( substr ( $ url , 0 , 1 ) != '/' ) { $ url = substr ( $ _SERVER [ 'SCRIPT_NAME' ] , 0 , strrpos ( $ _SERVER [ 'SCRIPT_NAME' ] , '/' ) + 1 ) . $ url ; } $ url = 'http://' . $ _SERVER [ 'HTTP_HOST' ] . $ url ; } $ this -> _url = str_replace ( '&amp;' , '&' , $ url ) ; $ this -> _urlParams = null ; }
Set request URL
Relative url will be converted to full url by adding host and protocol.
@param string $url raw url
Set request URL Relative url will be converted to full url by adding host and protocol .