42 private function formatTime( $timestamp ) {
45 return gmdate(
'Y-m-d\TH:i:s', (
int)
wfTimestamp( TS_UNIX, $timestamp ) );
63 'feedID' => $this->getSelfUrl(),
66 $this->urlUtils->expand( $this->getUrlUnescaped(),
PROTO_CURRENT ) ??
''
68 'selfUrl' => $this->getSelfUrl(),
73 print $this->templateParser->processTemplate(
'AtomHeader', $templateParams );
81 private function getSelfUrl() {
83 return htmlspecialchars(
$wgRequest->getFullRequestURL() );
97 "uniqueID" => $item->getUniqueID(),
98 "title" => $item->getTitle(),
99 "mimeType" => $this->
xmlEncode( $mimeType ),
101 $this->urlUtils->expand( $item->getUrlUnescaped(),
PROTO_CURRENT ) ??
''
103 "date" => $this->
xmlEncode( $this->formatTime( $item->getDate() ) ),
104 "description" => $item->getDescription(),
105 "author" => $item->getAuthor()
107 print $this->templateParser->processTemplate(
'AtomItem', $templateParams );
119class_alias( AtomFeed::class,
'AtomFeed' );
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.
A class containing constants representing the names of configuration variables.
const MimeType
Name constant for the MimeType setting, for use with Config::get()