Go to the documentation of this file.
35 $result->addValue(
null,
'version',
'1.0' );
36 $result->addValue(
null,
'xmlns',
'http://archipelago.phrasewise.com/rsd' );
40 'engineName' =>
'MediaWiki',
41 'engineLink' =>
'https://www.mediawiki.org/',
48 $result->addValue(
null,
'service', $service );
58 =>
'apihelp-rsd-example-simple',
90 'docs' =>
'https://www.mediawiki.org/wiki/Special:MyLanguage/API',
103 Hooks::run(
'ApiRsdServiceApis', [ &$apis ] );
118 foreach ( $apis as $name => $info ) {
121 'preferred' =>
wfBoolToStr( $name ==
'MediaWiki' ),
122 'apiLink' => $info[
'apiLink'],
123 'blogID' => $info[
'blogID'] ??
'',
126 if ( isset( $info[
'docs'] ) ) {
127 $settings[
'docs'] = $info[
'docs'];
130 if ( isset( $info[
'settings'] ) ) {
131 foreach ( $info[
'settings'] as $setting => $val ) {
132 if ( is_bool( $val ) ) {
137 $setting = [
'name' => $setting ];
139 $settings[] = $setting;
142 if ( count( $settings ) ) {
144 $data[
'settings'] = $settings;
146 $outputData[] = $data;
getCustomPrinter()
If the module may only be used with a certain format module, it should override this method to return...
formatRsdApiList()
Formats the internal list of exposed APIs into an array suitable to pass to the API's XML formatter.
getResult()
Get the result object.
static newMainPage(MessageLocalizer $localizer=null)
Create a new Title for the Main Page.
This abstract class implements many basic API functions, and is the base of all API classes.
wfBoolToStr( $value)
Convenience function converts boolean values into "true" or "false" (string) values.
static setContentValue(array &$arr, $name, $value, $flags=0)
Add an output value to the array by name and mark as META_CONTENT.
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
getRsdApiList()
Builds an internal list of APIs to expose information about.
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
API module for sending out RSD information.
getExamplesMessages()
Returns usage examples for this module.
isReadMode()
Indicates whether this module requires read rights.
getMain()
Get the main module.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
static setSubelementsList(array &$arr, $names)
Causes the elements with the specified names to be output as subelements rather than attributes.
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.