1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-04 15:57:45 +02:00

[ticket/17414] Start work on new captcha classes

PHPBB-17414
This commit is contained in:
Marc Alexander
2024-08-31 22:05:42 +02:00
parent ae8a5e791e
commit b828c56dc9
5 changed files with 196 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace phpbb\captcha\plugins;
interface plugin_interface
{
const CONFIRMATION_REGISTRATION = 1;
const CONFIRMATION_LOGIN = 2;
const CONFIRMATION_POST = 3;
const CONFIRMATION_REPORT = 4;
/**
* Check if the plugin is available
* @return bool True if the plugin is available, false if not
*/
public function is_available(): bool;
/**
* Check if the plugin has a configuration
*
* @return bool True if the plugin has a configuration, false if not
*/
public function has_config(): bool;
/**
* Get the name of the plugin, should be language variable
*
* @return string
*/
public static function get_name(): string;
/**
* Display the captcha for the specified type
*
* @param int $type Type of captcha, should be one of the CONFIRMATION_* constants
* @return void
*/
public function show(int $type): void;
}