Uri::getAuthority()

In this article

Source

public function getAuthority(): string
{
    if ('' === $this->host) {
        return '';
    }
    $authority = $this->host;
    if ('' !== $this->userInfo) {
        $authority = $this->userInfo . '@' . $authority;
    }
    if (null !== $this->port) {
        $authority .= ':' . $this->port;
    }
    return $authority;
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.