MediaWiki REL1_31
ApiFancyCaptchaReload.php
Go to the documentation of this file.
1<?php
9 public function execute() {
10 # Get a new FancyCaptcha form data
11 $captcha = new FancyCaptcha();
12 $info = $captcha->getCaptcha();
13 $captchaIndex = $captcha->storeCaptcha( $info );
14
15 $result = $this->getResult();
16 $result->addValue( null, $this->getModuleName(), [ 'index' => $captchaIndex ] );
17 return true;
18 }
19
20 public function getAllowedParams() {
21 return [];
22 }
23
28 protected function getExamplesMessages() {
29 return [
30 'action=fancycaptchareload'
31 => 'apihelp-fancycaptchareload-example-1',
32 ];
33 }
34}
This abstract class implements many basic API functions, and is the base of all API classes.
Definition ApiBase.php:37
getResult()
Get the result object.
Definition ApiBase.php:641
getModuleName()
Get the name of the module being executed by this instance.
Definition ApiBase.php:521
Api module to reload FancyCaptcha.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
FancyCaptcha for displaying captchas precomputed by captcha.py.