70 abstract public function outItem( $item );
92 # We take over from $wgOut, excepting its cache header info
95 header(
"Content-type: $mimetype; charset=UTF-8" );
98 $mimeAnalyzer = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
99 $ext = $mimeAnalyzer->getExtensionFromMimeTypeOrNull( $mimetype ) ??
'xml';
100 header(
"Content-Disposition: inline; filename=\"feed.{$ext}\"" );
103 $wgOut->addVaryHeader(
'X-Forwarded-Proto' );
105 $wgOut->sendCacheControl();
118 $ctype =
$wgRequest->getVal(
'ctype',
'application/xml' );
122 'application/rss+xml',
123 'application/atom+xml'
126 return ( in_array( $ctype, $allowedctypes ) ? $ctype :
'application/xml' );
134 echo
'<?xml version="1.0"?>' .
"\n";
$wgVaryOnXFP
Add X-Forwarded-Proto to the Vary and Key headers for API requests and RSS/Atom feeds.
if(! $wgDBerrorLogTZ) $wgRequest
Class to support the outputting of syndication feeds in Atom and RSS format.
outFooter()
Generate Footer of the feed.
TemplateParser $templateParser
outHeader()
Generate Header of the feed.
__construct( $title, $description, $url, $date='', $author='', $comments='')
Stable to call.
contentType()
Return an internet media type to be sent in the headers.
httpHeaders()
Setup and send HTTP headers.
outItem( $item)
Generate an item.
outXmlHeader()
Output the initial XML headers.
A base class for outputting syndication feeds (e.g.
if(!is_readable( $file)) $ext