MediaWiki master
ApiFormatXmlRsd.php
Go to the documentation of this file.
1<?php
2
10namespace MediaWiki\Api;
11
16 public function __construct( ApiMain $main, string $format ) {
17 parent::__construct( $main, $format );
18 $this->setRootElement( 'rsd' );
19 }
20
22 public function getMimeType() {
23 return 'application/rsd+xml';
24 }
25
27 public static function recXmlPrint( $name, $value, $indent, $attributes = [] ) {
28 unset( $attributes['_idx'] );
29 return parent::recXmlPrint( $name, $value, $indent, $attributes );
30 }
31}
32
34class_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.When getIsHtml() returns tru...
static recXmlPrint( $name, $value, $indent, $attributes=[])
This method takes an array and converts it to XML.string
API XML output formatter.
setRootElement(string $rootElemName)
This is the main API class, used for both external and internal processing.
Definition ApiMain.php:65