* @var Title
*/
var $title;
+
var $description;
var $url;
var $date;
* @todo document (needs one-sentence top-level class description).
* @ingroup Feed
*/
-class ChannelFeed extends FeedItem {
- /**#@+
- * Abstract function, override!
- * @abstract
- */
-
+abstract class ChannelFeed extends FeedItem {
/**
* Generate Header of the feed
+ * @par Example:
+ * @code
+ * print "<feed>";
+ * @endcode
+ * @param $item
*/
- function outHeader() {
- # print "<feed>";
- }
+ abstract public function outHeader();
/**
* Generate an item
+ * @par Example:
+ * @code
+ * print "<item>...</item>";
+ * @endcode
* @param $item
*/
- function outItem( $item ) {
- # print "<item>...</item>";
- }
+ abstract public function outItem( $item );
/**
* Generate Footer of the feed
+ * @par Example:
+ * @code
+ * print "</feed>";
+ * @endcode
*/
- function outFooter() {
- # print "</feed>";
- }
- /**#@-*/
+ abstract public function outFooter();
/**
* Setup and send HTTP headers. Don't send any content;
<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>
+ <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 }?>
class AtomFeed extends ChannelFeed {
/**
* @todo document
+ * @return string
*/
function formatTime( $ts ) {
// need to use RFC 822 time format at least for rss2.0