42 private function formatTime( $timestamp ) {
45 return gmdate(
'Y-m-d\TH:i:s', (
int)
wfTimestamp( TS_UNIX, $timestamp ) );
63 'feedID' => $this->getSelfUrl(),
66 'selfUrl' => $this->getSelfUrl(),
71 print $this->templateParser->processTemplate(
'AtomHeader', $templateParams );
78 private function getSelfUrl() {
80 return htmlspecialchars(
$wgRequest->getFullRequestURL() );
93 "uniqueID" => $item->getUniqueID(),
94 "title" => $item->getTitle(),
95 "mimeType" => $this->
xmlEncode( $mimeType ),
97 "date" => $this->
xmlEncode( $this->formatTime( $item->getDate() ) ),
98 "description" => $item->getDescription(),
99 "author" => $item->getAuthor()
101 print $this->templateParser->processTemplate(
'AtomItem', $templateParams );
113class_alias( AtomFeed::class,
'AtomFeed' );
const MW_VERSION
The running version of MediaWiki.
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL using $wgServer (or one of its alternatives).
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()