mediawiki-extensions-Confir.../includes/Specials/SpecialCaptcha.php
Reedy 30cd1d8a23 Namespace base classes
Change-Id: I3fa9747e0ea970c5de39e2da8603e1bba9388a69
2022-07-30 18:13:03 +00:00

31 lines
614 B
PHP

<?php
namespace MediaWiki\Extension\ConfirmEdit\Specials;
use MediaWiki\Extension\ConfirmEdit\Hooks;
use UnlistedSpecialPage;
class SpecialCaptcha extends UnlistedSpecialPage {
public function __construct() {
parent::__construct( 'Captcha' );
}
/**
* @inheritDoc
*/
public function execute( $par ) {
$this->setHeaders();
$instance = Hooks::getInstance();
if ( $par === 'image' && method_exists( $instance, 'showImage' ) ) {
// @todo: Do this in a more OOP way
/** @phan-suppress-next-line PhanUndeclaredMethod */
$instance->showImage();
return;
}
$instance->showHelp();
}
}