*/
class RSSCreator10 extends FeedCreator
{
/** @inheritdoc */
public function createFeed()
{
$feed = "encoding."\"?>\n";
$feed .= $this->_createGeneratorComment();
if (empty($this->cssStyleSheet)) {
$this->cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css";
}
$feed .= $this->_createStylesheetReferences();
$feed .= "items[0]->thumb)) {
$feed .= " xmlns:photo=\"http://www.pheed.com/pheed/\"\n";
}
if (!empty($this->items[0]->lat)) {
$feed .= " xmlns:georss=\"http://www.georss.org/georss\"\n";
}
$feed .= " xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n";
$feed .= " syndicationURL."\">\n";
$feed .= " ".htmlspecialchars((string) $this->title)."\n";
$feed .= " ".htmlspecialchars((string) $this->description)."\n";
$feed .= " ".$this->link."\n";
if ($this->image != null) {
$feed .= " image->url."\" />\n";
}
$now = new FeedDate();
$feed .= " ".htmlspecialchars($now->iso8601())."\n";
$feed .= " \n";
$feed .= " \n";
for ($i = 0; $i < count($this->items); $i++) {
$feed .= " items[$i]->link)."\"/>\n";
}
$feed .= " \n";
$feed .= " \n";
$feed .= " \n";
if ($this->image != null) {
$feed .= " image->url."\">\n";
$feed .= " ".$this->image->title."\n";
$feed .= " ".$this->image->link."\n";
$feed .= " ".$this->image->url."\n";
$feed .= " \n";
}
$feed .= $this->_createAdditionalElements($this->additionalElements, " ");
for ($i = 0; $i < count($this->items); $i++) {
$feed .= " - items[$i]->link)."\">\n";
$feed .= " text/html\n";
if ($this->items[$i]->date != null) {
$itemDate = new FeedDate($this->items[$i]->date);
$feed .= " ".htmlspecialchars($itemDate->iso8601())."\n";
}
if ($this->items[$i]->source != "") {
$feed .= " ".htmlspecialchars($this->items[$i]->source)."\n";
}
$creator = $this->getAuthor($this->items[$i]->author, $this->items[$i]->authorEmail);
if ($creator) {
$feed .= " ".htmlspecialchars($creator)."\n";
}
if ($this->items[$i]->lat != "") {
$feed .= " ".$this->items[$i]->lat." ".$this->items[$i]->long."\n";
}
if ($this->items[$i]->thumb != "") {
$feed .= " ".htmlspecialchars($this->items[$i]->thumb)."\n";
}
$feed .= " ".htmlspecialchars(
strip_tags(strtr((string) $this->items[$i]->title, "\n\r", " "))
)."\n";
$feed .= " ".htmlspecialchars((string) $this->items[$i]->link)."\n";
$feed .= " ".htmlspecialchars((string) $this->items[$i]->description)."\n";
$feed .= $this->_createAdditionalElements($this->items[$i]->additionalElements, " ");
$feed .= "
\n";
}
$feed .= "\n";
return $feed;
}
/**
* Compose the RSS-1.0 author field.
*
* @author Joe Lapp
* @param string $author
* @param string $email
* @return string
*/
protected function getAuthor($author, $email)
{
if ($author) {
if ($email) {
return $author.' ('.$email.')';
}
return $author;
}
return $email;
}
}