public function setHost($host)
    {
        try {
            $host = new StringObject($host);
        } catch (\Exception $e) {
            throw new UrlObjectException($e->getMessage());
        }

        $this->host = $host->stripTrailingSlash()->trim()->val();

        $this->rebuildUrl();

        return $this;
    }