, Scott Reynen */ class AtomCreator03 extends FeedCreator { /** * AtomCreator03 constructor. */ public function __construct() { $this->contentType = "application/atom+xml"; $this->encoding = "utf-8"; } /** @inheritdoc */ public function createFeed() { $feed = "encoding."\"?>\n"; $feed .= $this->_createGeneratorComment(); $feed .= $this->_createStylesheetReferences(); $feed .= "format == 'TOOLBAR') { $feed .= " xmlns:gtb=\"http://toolbar.google.com/custombuttons/\""; } if ($this->language != "") { $feed .= " xml:lang=\"".$this->language."\""; } $feed .= ">\n"; $feed .= " ".htmlspecialchars($this->title)."\n"; $feed .= " ".htmlspecialchars($this->description)."\n"; $feed .= " link)."\"/>\n"; $feed .= " ".htmlspecialchars($this->link)."\n"; $now = new FeedDate(); $feed .= " ".htmlspecialchars($now->iso8601())."\n"; if ($this->editor != "") { $feed .= " \n"; $feed .= " ".$this->editor."\n"; if ($this->editorEmail != "") { $feed .= " ".$this->editorEmail."\n"; } $feed .= " \n"; } $feed .= " ".FEEDCREATOR_VERSION."\n"; $feed .= $this->_createAdditionalElements($this->additionalElements, " "); for ($i = 0; $i < count($this->items); $i++) { $feed .= " \n"; $feed .= " ".htmlspecialchars(strip_tags($this->items[$i]->title))."\n"; $feed .= " items[$i]->link )."\"/>\n"; if ($this->items[$i]->date == "") { $this->items[$i]->date = time(); } $itemDate = new FeedDate($this->items[$i]->date); $feed .= " ".htmlspecialchars($itemDate->iso8601())."\n"; $feed .= " ".htmlspecialchars($itemDate->iso8601())."\n"; $feed .= " ".htmlspecialchars($itemDate->iso8601())."\n"; $feed .= " ".htmlspecialchars($this->items[$i]->link)."\n"; $feed .= $this->_createAdditionalElements($this->items[$i]->additionalElements, " "); if ($this->items[$i]->author != "") { $feed .= " \n"; $feed .= " ".htmlspecialchars($this->items[$i]->author)."\n"; $feed .= " \n"; } if ($this->items[$i]->description != "") { $feed .= " ".htmlspecialchars($this->items[$i]->description)."\n"; } if (isset($this->items[$i]->thumbdata)) { $feed .= " \n"; $feed .= chunk_split(base64_encode($this->items[$i]->thumbdata))."\n"; $feed .= " \n"; } $feed .= " \n"; } $feed .= "\n"; return $feed; } }