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