MediaWiki  1.27.1
AtomFeed Class Reference

Generate an Atom feed. More...

Inheritance diagram for AtomFeed:
Collaboration diagram for AtomFeed:

Public Member Functions

 formatTime ($timestamp)
 Format a date given timestamp. More...
 
 outFooter ()
 Outputs the footer for Atom 1.0 feed (basically '\</feed\>'). More...
 
 outHeader ()
 Outputs a basic header for Atom 1.0 feeds. More...
 
 outItem ($item)
 Output a given item. More...
 
- Public Member Functions inherited from ChannelFeed
 httpHeaders ()
 Setup and send HTTP headers. More...
 
 outFooter ()
 Generate Footer of the feed. More...
 
 outHeader ()
 Generate Header of the feed. More...
 
 outItem ($item)
 Generate an item. More...
 
- Public Member Functions inherited from FeedItem
 __construct ($title, $description, $url, $date= '', $author= '', $comments= '')
 Constructor. More...
 
 getAuthor ()
 Get the author of this item; already xml-encoded. More...
 
 getComments ()
 Get the comment of this item; already xml-encoded. More...
 
 getDate ()
 Get the date of this item. More...
 
 getDescription ()
 Get the description of this item; already xml-encoded. More...
 
 getLanguage ()
 Get the language of this item. More...
 
 getTitle ()
 Get the title of this item; already xml-encoded. More...
 
 getUniqueId ()
 Get the unique id of this item. More...
 
 getUrl ()
 Get the URL of this item; already xml-encoded. More...
 
 setUniqueId ($uniqueId, $rssIsPermalink=false)
 Set the unique id of an item. More...
 
 xmlEncode ($string)
 Encode $string so that it can be safely embedded in a XML document. More...
 

Private Member Functions

 getFeedId ()
 Atom 1.0 requires a unique, opaque IRI as a unique identifier for every feed we create. More...
 
 getSelfUrl ()
 Atom 1.0 requests a self-reference to the feed. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from FeedItem
static stripComment ($text)
 Quickie hack... More...
 
- Public Attributes inherited from FeedItem
 $author
 
 $comments
 
 $date
 
 $description
 
 $rssIsPermalink = false
 
Title $title
 
 $uniqueId
 
 $url
 
- Protected Member Functions inherited from ChannelFeed
 outXmlHeader ()
 Output the initial XML headers. More...
 

Detailed Description

Generate an Atom feed.

Definition at line 340 of file Feed.php.

Member Function Documentation

AtomFeed::formatTime (   $timestamp)

Format a date given timestamp.

Parameters
string | int$timestamp
Returns
string

Definition at line 347 of file Feed.php.

References $timestamp, TS_UNIX, and wfTimestamp().

Referenced by outHeader(), and outItem().

AtomFeed::getFeedId ( )
private

Atom 1.0 requires a unique, opaque IRI as a unique identifier for every feed we create.

For now just use the URL, but who can tell if that's right? If we put options on the feed, do we have to change the id? Maybe? Maybe not.

Returns
string

Definition at line 381 of file Feed.php.

References getSelfUrl().

Referenced by outHeader().

AtomFeed::getSelfUrl ( )
private

Atom 1.0 requests a self-reference to the feed.

Returns
string

Definition at line 389 of file Feed.php.

References $wgRequest, and global.

Referenced by getFeedId().

AtomFeed::outFooter ( )

Outputs the footer for Atom 1.0 feed (basically '\</feed\>').

Definition at line 422 of file Feed.php.

References php.

AtomFeed::outHeader ( )

Outputs a basic header for Atom 1.0 feeds.

Definition at line 355 of file Feed.php.

References $wgVersion, formatTime(), FeedItem\getDescription(), getFeedId(), FeedItem\getTitle(), global, href, link, ChannelFeed\outXmlHeader(), php, print, title, type, and wfTimestampNow().

AtomFeed::outItem (   $item)

Output a given item.

Parameters
FeedItem$item

Definition at line 398 of file Feed.php.

References $wgMimeType, formatTime(), global, href, link, name, php, print, title, and type.


The documentation for this class was generated from the following file: