MediaWiki master
ApiDisabled.php
Go to the documentation of this file.
1<?php
23namespace MediaWiki\Api;
24
35class ApiDisabled extends ApiBase {
36
37 public function execute() {
38 $this->dieWithError( [ 'apierror-moduledisabled', $this->getModuleName() ] );
39 }
40
41 public function isReadMode() {
42 return false;
43 }
44
45 protected function getSummaryMessage() {
46 return 'apihelp-disabled-summary';
47 }
48
49 protected function getExtendedDescription() {
50 return [ [
51 'apihelp-disabled-extended-description',
52 'api-help-no-extended-description',
53 ] ];
54 }
55}
56
58class_alias( ApiDisabled::class, 'ApiDisabled' );
This abstract class implements many basic API functions, and is the base of all API classes.
Definition ApiBase.php:76
dieWithError( $msg, $code=null, $data=null, $httpCode=0)
Abort execution with an error.
Definition ApiBase.php:1577
getModuleName()
Get the name of the module being executed by this instance.
Definition ApiBase.php:571
API module that dies with an error immediately.
getSummaryMessage()
Return the summary message.
isReadMode()
Indicates whether this module requires read rights.
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
getExtendedDescription()
Return the extended help text message.