MediaWiki REL1_31
MockApi.php
Go to the documentation of this file.
1<?php
2
3class MockApi extends ApiBase {
4 public $warnings = [];
5
6 public function execute() {
7 }
8
9 public function __construct() {
10 }
11
12 public function getModulePath() {
13 return $this->getModuleName();
14 }
15
16 public function addWarning( $warning, $code = null, $data = null ) {
17 $this->warnings[] = $warning;
18 }
19
20 public function getAllowedParams() {
21 return [
22 'filename' => null,
23 'enablechunks' => false,
24 'sessionkey' => null,
25 ];
26 }
27}
This abstract class implements many basic API functions, and is the base of all API classes.
Definition ApiBase.php:37
getModuleName()
Get the name of the module being executed by this instance.
Definition ApiBase.php:521
$warnings
Definition MockApi.php:4
__construct()
Definition MockApi.php:9
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
Definition MockApi.php:20
getModulePath()
Get the path to this module.
Definition MockApi.php:12
addWarning( $warning, $code=null, $data=null)
Add a warning for this module.
Definition MockApi.php:16
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Definition MockApi.php:6
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
Definition hooks.txt:865