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

PIECreator01::createFeed (  ) 

Builds the feed's text.

Returns:
string the feed's complete text

Reimplemented from FeedCreator.

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

                          {
        $feed = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
        $feed.= "<feed version=\"0.1\" xmlns=\"http://example.com/newformat#\">\n";
        $feed.= "    <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
        $feed.= "    <subtitle>".FeedCreator::iTrunc(htmlspecialchars($this->description),500)."</subtitle>\n";
        $feed.= "    <link>".$this->link."</link>\n";
        for ($i=0;$i<count($this->items);$i++) {
            $feed.= "    <entry>\n";
            $feed.= "        <title>".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100)."</title>\n";
            $feed.= "        <link>".htmlspecialchars($this->items[$i]->link)."</link>\n";
            $itemDate = new FeedDate($this->items[$i]->date);
            $feed.= "        <created>".htmlspecialchars($itemDate->iso8601())."</created>\n";
            $feed.= "        <issued>".htmlspecialchars($itemDate->iso8601())."</issued>\n";
            $feed.= "        <modified>".htmlspecialchars($itemDate->iso8601())."</modified>\n";
            $feed.= "        <id>".$this->items[$i]->guid."</id>\n";
            if ($this->items[$i]->author!="") {
                $feed.= "        <author>\n";
                $feed.= "            <name>".htmlspecialchars($this->items[$i]->author)."</name>\n";
                if ($this->items[$i]->authorEmail!="") {
                    $feed.= "            <email>".$this->items[$i]->authorEmail."</email>\n";
                }
                $feed.="        </author>\n";
            }
            $feed.= "        <content type=\"text/html\" xml:lang=\"en-us\">\n";
            $feed.= "            <div xmlns=\"http://www.w3.org/1999/xhtml\">".$this->items[$i]->description."</div>\n";
            $feed.= "        </content>\n";
            $feed.= "    </entry>\n";
        }
        $feed.= "</feed>\n";
        return $feed;
    }


Generated by  Doxygen 1.6.0   Back to index