MediaWiki REL1_32
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
12
13 switch ( $par ) {
14 case "image":
15 if ( method_exists( $instance, 'showImage' ) ) {
16 // @todo: Do this in a more OOP way
17 return $instance->showImage();
18 }
19 case "help":
20 default:
21 return $instance->showHelp();
22 }
23 }
24}
static getInstance()
Get the global Captcha instance.
execute( $par)
Default execute method Checks user permissions.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Shortcut to construct a special page which is unlisted by default.