MediaWiki  1.34.0
SpecialCaptcha.php
Go to the documentation of this file.
1 <?php
2 
4  public function __construct() {
5  parent::__construct( 'Captcha' );
6  }
7 
8  public function execute( $par ) {
9  $this->setHeaders();
10 
11  $instance = ConfirmEditHooks::getInstance();
12 
13  switch ( $par ) {
14  case "image":
15  if ( method_exists( $instance, 'showImage' ) ) {
16  // @todo: Do this in a more OOP way
18  return $instance->showImage();
19  }
20  case "help":
21  default:
22  return $instance->showHelp();
23  }
24  }
25 }
SpecialCaptcha\__construct
__construct()
Definition: SpecialCaptcha.php:4
UnlistedSpecialPage
Shortcut to construct a special page which is unlisted by default.
Definition: UnlistedSpecialPage.php:29
ConfirmEditHooks\getInstance
static getInstance()
Get the global Captcha instance.
Definition: ConfirmEditHooks.php:13
SpecialPage\setHeaders
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Definition: SpecialPage.php:537
SpecialCaptcha
Definition: SpecialCaptcha.php:3
SpecialCaptcha\execute
execute( $par)
Default execute method Checks user permissions.
Definition: SpecialCaptcha.php:8