public function render()
    {
        $result = "";
        $params = [];
        $params['Host'] = $this->host;
        $siteMap = $this->sitemap;
        if (is_array($siteMap)) {
            $siteMap = Url::to($siteMap, true);
        }

        $params['Sitemap'] = $siteMap;
        foreach (array_filter($params) as $key => $value) {
            $result .= "$key: $value\n";
        }
        foreach ($this->userAgent as $userAgent => $value) {
            $result .= "User-agent: $userAgent\n";
            foreach ($value as $param => $urls) {
                if (is_string($urls)) {
                    $urls = [$urls];
                }

                $isWithScheme = false;
                if ($param == 'Sitemap') {
                    $urls = [$urls];
                    $isWithScheme = true;
                }

                foreach ($urls as $url) {
                    if (is_array($url)) {
                        $url = Url::to($url, $isWithScheme);
                    }

                    $result .= "$param: $url\n";
                }
            }
        }
        return $result;

    }