MediaWiki master
ApiFormatXmlRsd.php
Go to the documentation of this file.
1<?php
2
24namespace MediaWiki\Api;
25
30 public function __construct( ApiMain $main, string $format ) {
31 parent::__construct( $main, $format );
32 $this->setRootElement( 'rsd' );
33 }
34
35 public function getMimeType() {
36 return 'application/rsd+xml';
37 }
38
39 public static function recXmlPrint( $name, $value, $indent, $attributes = [] ) {
40 unset( $attributes['_idx'] );
41 return parent::recXmlPrint( $name, $value, $indent, $attributes );
42 }
43}
44
46class_alias( ApiFormatXmlRsd::class, 'ApiFormatXmlRsd' );
__construct(ApiMain $main, string $format)
If $format ends with 'fm', pretty-print the output in HTML.
getMimeType()
Overriding class returns the MIME type that should be sent to the client.
static recXmlPrint( $name, $value, $indent, $attributes=[])
This method takes an array and converts it to XML.
API XML output formatter.
setRootElement( $rootElemName)
This is the main API class, used for both external and internal processing.
Definition ApiMain.php:78