12use Wikimedia\Timestamp\TimestampFormat as TS;
27 private function formatTime( $ts ) {
29 return gmdate(
'D, d M Y H:i:s \G\M\T', (
int)
wfTimestamp( TS::UNIX, $ts ) );
45 $this->urlUtils->expand( $this->getUrlUnescaped(),
PROTO_CURRENT ) ??
''
52 print $this->templateParser->processTemplate(
'RSSHeader', $templateParams );
63 "title" => $item->getTitle(),
64 "url" => $this->xmlEncode(
65 $this->urlUtils->expand( $item->getUrlUnescaped(),
PROTO_CURRENT ) ??
''
67 "permalink" => $item->rssIsPermalink,
68 "uniqueID" => $item->getUniqueID(),
69 "description" => $item->getDescription(),
70 "date" => $this->xmlEncodeNullable( $this->formatTime( $item->getDate() ) ),
71 "author" => $item->getAuthor()
75 $commentsEscaped = $this->xmlEncode(
78 $templateParams[
"comments"] = $commentsEscaped;
80 print $this->templateParser->processTemplate(
'RSSItem', $templateParams );
88 print
"</channel></rss>";
const MW_VERSION
The running version of MediaWiki.
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
wfTimestamp( $outputtype=TS::UNIX, $ts=0)
Get a timestamp string in one of various formats.