Logo Search packages:      
Sourcecode: websvn version File versions  Download package

OPMLCreator::createFeed (  ) 

Builds the feed's text.

Returns:
string the feed's complete text

Reimplemented from FeedCreator.

Definition at line 1063 of file feedcreator.class.php.

References FeedCreator::$title, and FeedCreator::_createGeneratorComment().

                          {     
        $feed = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
        $feed.= $this->_createGeneratorComment();
        $feed.= "<opml xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n";
        $feed.= "    <head>\n";
        $feed.= "        <title>".htmlspecialchars($this->title)."</title>\n";
        if ($this->pubDate!="") {
            $date = new FeedDate($this->pubDate);
            $feed.= "         <dateCreated>".$date->rfc822()."</dateCreated>\n";
        }
        if ($this->lastBuildDate!="") {
            $date = new FeedDate($this->lastBuildDate);
            $feed.= "         <dateModified>".$date->rfc822()."</dateModified>\n";
        }
        if ($this->editor!="") {
            $feed.= "         <ownerName>".$this->editor."</ownerName>\n";
        }
        if ($this->editorEmail!="") {
            $feed.= "         <ownerEmail>".$this->editorEmail."</ownerEmail>\n";
        }
        $feed.= "    </head>\n";
        $feed.= "    <body>\n";
        for ($i=0;$i<count($this->items);$i++) {
            $feed.= "    <outline type=\"rss\" ";
            $title = htmlspecialchars(strip_tags(strtr($this->items[$i]->title,"\n\r","  ")));
            $feed.= " title=\"".$title."\"";
            $feed.= " text=\"".$title."\"";
            //$feed.= " description=\"".htmlspecialchars($this->items[$i]->description)."\"";
            $feed.= " url=\"".htmlspecialchars($this->items[$i]->link)."\"";
            $feed.= "/>\n";
        }
        $feed.= "    </body>\n";
        $feed.= "</opml>\n";
        return $feed;
    }


Generated by  Doxygen 1.6.0   Back to index