Go to the documentation of this file.
44 $this->templateParser =
new TemplateParser();
64 abstract public function outItem( $item );
86 # We take over from $wgOut, excepting its cache header info
89 header(
"Content-type: $mimetype; charset=UTF-8" );
93 ->getExtensionsForType( $mimetype );
94 $ext = $exts ? strtok( $exts,
' ' ) :
'xml';
95 header(
"Content-Disposition: inline; filename=\"feed.{$ext}\"" );
98 $wgOut->addVaryHeader(
'X-Forwarded-Proto' );
100 $wgOut->sendCacheControl();
111 $ctype =
$wgRequest->getVal(
'ctype',
'application/xml' );
115 'application/rss+xml',
116 'application/atom+xml'
119 return ( in_array( $ctype, $allowedctypes ) ? $ctype :
'application/xml' );
127 echo
'<?xml version="1.0"?>' .
"\n";
contentType()
Return an internet media type to be sent in the headers.
A base class for outputting syndication feeds (e.g.
outItem( $item)
Generate an item.
__construct( $title, $description, $url, $date='', $author='', $comments='')
httpHeaders()
Setup and send HTTP headers.
outXmlHeader()
Output the initial XML headers.
TemplateParser $templateParser
$wgVaryOnXFP
Add X-Forwarded-Proto to the Vary and Key headers for API requests and RSS/Atom feeds.
Class to support the outputting of syndication feeds in Atom and RSS format.
outFooter()
Generate Footer of the feed.
outHeader()
Generate Header of the feed.
if(!is_readable( $file)) $ext
if(! $wgDBerrorLogTZ) $wgRequest