MediaWiki  1.34.0
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 }
ApiFancyCaptchaReload\execute
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Definition: ApiFancyCaptchaReload.php:9
ApiBase\getResult
getResult()
Get the result object.
Definition: ApiBase.php:640
ApiBase
This abstract class implements many basic API functions, and is the base of all API classes.
Definition: ApiBase.php:42
ApiFancyCaptchaReload\getAllowedParams
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
Definition: ApiFancyCaptchaReload.php:20
FancyCaptcha
FancyCaptcha for displaying captchas precomputed by captcha.py.
Definition: FancyCaptcha.php:9
ApiFancyCaptchaReload\getExamplesMessages
getExamplesMessages()
Definition: ApiFancyCaptchaReload.php:28
ApiBase\getModuleName
getModuleName()
Get the name of the module being executed by this instance.
Definition: ApiBase.php:520
ApiFancyCaptchaReload
Api module to reload FancyCaptcha.
Definition: ApiFancyCaptchaReload.php:8