MediaWiki  1.23.2
Feed.php File Reference

Basic support for outputting syndication feeds in RSS, other formats. More...

Go to the source code of this file.

Classes

class  AtomFeed
 Generate an Atom feed. More...
 
class  FeedItem
 A base class for basic support for outputting syndication feeds in RSS and other formats. More...
 

Functions

 contentType ()
 Return an internet media type to be sent in the headers. More...
 
 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...
 
 outXmlHeader ()
 Output the initial XML headers with a stylesheet for legibility if someone finds it in a browser. More...
 

Variables

ChannelFeed FeedItem xml stylesheet d M Y H
 
ChannelFeed FeedItem xml stylesheet type
 

Detailed Description

Basic support for outputting syndication feeds in RSS, other formats.

Contain a feed class as well as classes to build rss / atom ... feeds Available feeds are defined in Defines.php

Copyright © 2004 Brion Vibber brion.nosp@m.@pob.nosp@m.ox.co.nosp@m.m https://www.mediawiki.org/

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Definition in file Feed.php.

Function Documentation

◆ contentType()

contentType ( )

Return an internet media type to be sent in the headers.

Returns
string
Access:\n private

Definition at line 318 of file Feed.php.

◆ httpHeaders()

httpHeaders ( )

Setup and send HTTP headers.

Don't send any content; content might end up being cached and re-sent with these same headers later.

This should be called from the outHeader() method, but can also be called separately.

Definition at line 298 of file Feed.php.

◆ outFooter()

outFooter ( )
abstract

Generate Footer of the feed.

Output an RSS 2.0 footer.

Example:
print "</feed>";

Definition at line 322 of file Feed.php.

References php.

◆ outHeader()

outHeader ( )
abstract

Generate Header of the feed.

Output an RSS 2.0 header.

Example:
print "<feed>";
Parameters
$item

Definition at line 286 of file Feed.php.

References global, outXmlHeader(), php, PROTO_CURRENT, title, version, wfExpandUrl(), and wfTimestampNow().

◆ outItem()

outItem (   $item)
abstract

Generate an item.

Output an RSS 2.0 item.

Example:
print "<item>...</item>";
Parameters
$item
$itemFeedItem: item to be output

Definition at line 305 of file Feed.php.

References MediaWiki\getTitle(), php, PROTO_CURRENT, title, and wfExpandUrl().

◆ outXmlHeader()

outXmlHeader ( )

Output the initial XML headers with a stylesheet for legibility if someone finds it in a browser.

Access:\n private

Definition at line 330 of file Feed.php.

Referenced by outHeader(), and AtomFeed\outHeader().