Horde_Core_Smartmobile_Url::toString PHP Method

toString() public method

Creates the full URL string.
public toString ( boolean $raw = false, boolean $full = true ) : string
$raw boolean Whether to output the URL in the raw URL format or HTML-encoded.
$full boolean Output the full URL?
return string The string representation of this object.
    public function toString($raw = false, $full = true)
    {
        if ($this->toStringCallback || !strlen($this->anchor)) {
            $baseUrl = $this->_baseUrl->copy();
            $baseUrl->parameters = array_merge($baseUrl->parameters, $this->parameters);
            if (strlen($this->pathInfo)) {
                $baseUrl->pathInfo = $this->pathInfo;
            }
            return $baseUrl->toString($raw, $full);
        }
        $url = $this->_baseUrl->toString($raw, $full);
        if (strlen($this->pathInfo)) {
            $url = rtrim($url, '/');
            $url .= '/' . $this->pathInfo;
        }
        if ($this->anchor) {
            $url .= '#' . ($raw ? $this->anchor : rawurlencode($this->anchor));
        }
        if ($params = $this->_getParameters()) {
            $url .= '?' . implode($raw ? '&' : '&', $params);
        }
        return strval($url);
    }
Horde_Core_Smartmobile_Url