public function getAuthority()
    {
        $authority = null;

        if (null !== $this->host) {

            if (null !== $this->userinfo) {
                $authority .= $this->userinfo . '@';
            }
            $authority .= $this->host;
            if (null !== $this->port) {
                $authority .= ':' . $this->port;
            }
        }

        return $authority;
    }