42 private function formatTime( $timestamp ) {
45 return gmdate(
'Y-m-d\TH:i:s', (
int)
wfTimestamp( TS_UNIX, $timestamp ) );
59 'feedID' => $this->getFeedId(),
62 'selfUrl' => $this->getSelfUrl(),
67 print $this->templateParser->processTemplate(
'AtomHeader', $templateParams );
78 private function getFeedId() {
79 return $this->getSelfUrl();
86 private function getSelfUrl() {
88 return htmlspecialchars(
$wgRequest->getFullRequestURL() );
101 "uniqueID" => $item->getUniqueID(),
102 "title" => $item->getTitle(),
103 "mimeType" => $this->
xmlEncode( $mimeType ),
105 "date" => $this->
xmlEncode( $this->formatTime( $item->getDate() ) ),
106 "description" => $item->getDescription(),
107 "author" => $item->getAuthor()
109 print $this->templateParser->processTemplate(
'AtomItem', $templateParams );
123 class_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()