getExtraInfos(); $title = htmlspecialchars($extraInfos['name']); $uri = htmlspecialchars($extraInfos['uri']); $entries = ''; foreach($this->getDatas() as $data){ $entryUri = is_null($data->uri) ? $uri : $data->uri; $entryTitle = is_null($data->title) ? '' : $this->sanitizeHtml(strip_tags($data->title)); $entryTimestamp = is_null($data->timestamp) ? '' : '' . date(DATE_ATOM, $data->timestamp) . ''; $entryContent = is_null($data->content) ? '' : '

' . $this->sanitizeHtml($data->content). '

'; $entries .= <<

{$entryTitle}

{$entryTimestamp} {$entryContent} EOD; } $styleCss = <<<'EOD' body{font-family:"Trebuchet MS",Verdana,Arial,Helvetica,sans-serif;font-size:10pt;background-color:#aaa;}div.rssitem{border:1px solid black;padding:5px;margin:10px;background-color:#fff;} EOD; /* Data are prepared, now let's begin the "MAGIE !!!" */ $toReturn = << {$title}

{$title}

{$entries} EOD; return $toReturn; } public function display() { $this ->setContentType('text/html; charset=' . $this->getCharset()) ->callContentType(); return parent::display(); } }