public function getAuthority()
    {
        $authority = $this->host;

        if ($this->host !== '' && $this->user !== null) {
            $authority = $this->user . '@' . $authority;

            $authority = $authority . ':' . $this->port;
        }

        return $authority;
    }