Ejemplo n.º 1
0
    /**
     * Output an RSS 2.0 item
     * @param FeedItem $item Item to be output
     */
    function outItem($item)
    {
        // @codingStandardsIgnoreStart Ignore long lines and formatting issues.
        ?>
		<item>
			<title><?php 
        print $item->getTitle();
        ?>
</title>
			<link><?php 
        print wfExpandUrl($item->getUrl(), PROTO_CURRENT);
        ?>
</link>
			<guid<?php 
        if (!$item->rssIsPermalink) {
            print ' isPermaLink="false"';
        }
        ?>
><?php 
        print $item->getUniqueId();
        ?>
</guid>
			<description><?php 
        print $item->getDescription();
        ?>
</description>
			<?php 
        if ($item->getDate()) {
            ?>
<pubDate><?php 
            print $this->formatTime($item->getDate());
            ?>
</pubDate><?php 
        }
        ?>
			<?php 
        if ($item->getAuthor()) {
            ?>
<dc:creator><?php 
            print $item->getAuthor();
            ?>
</dc:creator><?php 
        }
        ?>
			<?php 
        if ($item->getComments()) {
            ?>
<comments><?php 
            print wfExpandUrl($item->getComments(), PROTO_CURRENT);
            ?>
</comments><?php 
        }
        ?>
		</item>
<?php 
        // @codingStandardsIgnoreEnd
    }