class legacy_wrapper implements plugin_interface

Methods

__construct(object $legacy_captcha)

Constructor for legacy CAPTCHA wrapper

bool
is_available()

Check if the plugin is available

bool
has_config()

Check if the plugin has a configuration

string
get_name()

Get the name of the plugin, should be language variable

void
set_name(string $name)

Set the service name of the plugin

void
init(confirm_type $type)

Display the captcha for the specified type

array
get_hidden_fields()

Get hidden form fields for this captcha plugin

bool
validate()

Validate the captcha with the given request data

string
get_error()

Get error string from captcha

bool
is_solved()

Return whether captcha was solved

void
reset()

Reset captcha state, e.g. after checking if it's valid

int
get_attempt_count()

Get attempt count for this captcha and user

string
get_template()

Get template filename for captcha

string
get_demo_template()

Get template filename for demo

void
garbage_collect(confirm_type $confirm_type = confirm_type::UNDEFINED)

Garbage collect captcha plugin

void
acp_page(mixed $id, mixed $module)

Display acp page

Details

at line 29
__construct(object $legacy_captcha)

Constructor for legacy CAPTCHA wrapper

Parameters

object $legacy_captcha

at line 37
bool is_available()

Check if the plugin is available

Return Value

bool

True if the plugin is available, false if not

at line 50
bool has_config()

Check if the plugin has a configuration

Return Value

bool

True if the plugin has a configuration, false if not

at line 63
string get_name()

Get the name of the plugin, should be language variable

Return Value

string

at line 76
void set_name(string $name)

Set the service name of the plugin

Parameters

string $name

Return Value

void

at line 87
void init(confirm_type $type)

Display the captcha for the specified type

Parameters

confirm_type $type

Type of captcha, should be one of the CONFIRMATION_* constants

Return Value

void

at line 98
array get_hidden_fields()

Get hidden form fields for this captcha plugin

Return Value

array

Hidden form fields

at line 111
bool validate()

Validate the captcha with the given request data

Return Value

bool

True if request data was valid captcha reply, false if not

at line 131
string get_error()

Get error string from captcha

Return Value

string

Error string, empty string if there is no error

at line 139
bool is_solved()

Return whether captcha was solved

Return Value

bool

True if captcha was solved, false if not

at line 152
void reset()

Reset captcha state, e.g. after checking if it's valid

Return Value

void

at line 163
int get_attempt_count()

Get attempt count for this captcha and user

Return Value

int

Number of attempts

at line 177
string get_template()

Get template filename for captcha

Return Value

string

Template file name

at line 190
string get_demo_template()

Get template filename for demo

Return Value

string

Demo template file name

at line 203
void garbage_collect(confirm_type $confirm_type = confirm_type::UNDEFINED)

Garbage collect captcha plugin

Parameters

confirm_type $confirm_type

Confirm type to garbage collect, defaults to all (0)

Return Value

void

at line 214
void acp_page(mixed $id, mixed $module)

Display acp page

Parameters

mixed $id

ACP module id

mixed $module

ACP module name

Return Value

void