Charset = 'utf8'; $this->Title = ''; $this->Link = ''; $this->Description = ''; $this->WebmasterEmail = ''; $this->Items = array(); } function Generate(): string { $Result = 'Charset.'" ?>'."\n". //'."\n". " \n". " ".$this->Title."\n". " ".$this->Link."\n". " ".$this->Description."\n". " cs\n". " ".$this->WebmasterEmail."\n". " ".date('r')."\n". " 20\n"; foreach ($this->Items as $Item) { $Result .= " \n". ' '.htmlspecialchars($Item['Title'])."\n". ' '.htmlspecialchars($Item['Description'])."\n". ' '.date('r',$Item['Time'])."\n". ' '.$Item['Link']."\n". " \n"; } $Result .= " \n". ""; return $Result; } }