Neos\Flow\Http\Uri::__toString PHP Method

__toString() public method

Returns a string representation of this URI
public __toString ( ) : string
return string This URI as a string
    public function __toString()
    {
        $uriString = '';
        $uriString .= isset($this->scheme) ? $this->scheme . '://' : '';
        if (isset($this->username)) {
            if (isset($this->password)) {
                $uriString .= $this->username . ':' . $this->password . '@';
            } else {
                $uriString .= $this->username . '@';
            }
        }
        $uriString .= $this->host;
        if ($this->port !== null) {
            switch ($this->scheme) {
                case 'http':
                    $uriString .= $this->port !== 80 ? ':' . $this->port : '';
                    break;
                case 'https':
                    $uriString .= $this->port !== 443 ? ':' . $this->port : '';
                    break;
                default:
                    $uriString .= isset($this->port) ? ':' . $this->port : '';
            }
        }
        $uriString .= isset($this->path) ? $this->path : '';
        $uriString .= isset($this->query) ? '?' . $this->query : '';
        $uriString .= isset($this->fragment) ? '#' . $this->fragment : '';
        return $uriString;
    }