MediaWiki master
ApiDisabled.php
Go to the documentation of this file.
1<?php
9namespace MediaWiki\Api;
10
21class ApiDisabled extends ApiBase {
22
23 public function execute(): never {
24 $this->dieWithError( [ 'apierror-moduledisabled', $this->getModuleName() ] );
25 }
26
28 public function isReadMode() {
29 return false;
30 }
31
33 protected function getSummaryMessage() {
34 return 'apihelp-disabled-summary';
35 }
36
38 protected function getExtendedDescription() {
39 return [ [
40 'apihelp-disabled-extended-description',
41 'api-help-no-extended-description',
42 ] ];
43 }
44}
45
47class_alias( ApiDisabled::class, 'ApiDisabled' );
This abstract class implements many basic API functions, and is the base of all API classes.
Definition ApiBase.php:61
dieWithError( $msg, $code=null, $data=null, $httpCode=0)
Abort execution with an error.
Definition ApiBase.php:1511
getModuleName()
Get the name of the module being executed by this instance.
Definition ApiBase.php:543
API module that dies with an error immediately.
getSummaryMessage()
Return the summary message.This is a one-line description of the module, suitable for display in a li...
isReadMode()
Indicates whether this module requires read rights.to override bool
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
getExtendedDescription()
Return the extended help text message.This is additional text to display at the top of the help secti...
Language name search API.