3 * Api module to reload FancyCaptcha
8 class ApiFancyCaptchaReload extends ApiBase {
9 public function execute() {
10 # Get a new FancyCaptcha form data
11 $captcha = new FancyCaptcha();
12 $info = $captcha->getCaptcha();
13 $captchaIndex = $captcha->storeCaptcha( $info );
15 $result = $this->getResult();
16 $result->addValue( null, $this->getModuleName(), [ 'index' => $captchaIndex ] );
20 public function getAllowedParams() {
25 * @see ApiBase::getExamplesMessages()
27 protected function getExamplesMessages() {
29 'action=fancycaptchareload'
30 => 'apihelp-fancycaptchareload-example-1',