\Captcha\AdapterBaseAdapter

Base CAPTCHA adapter class.

All CAPTCHA adapters (reCAPTCHA, AYAH, etc) should extends this class.

Summary

Methods
Properties
Constants
__construct()
name()
settings()
render()
validate()
No public properties found
No constants found
No protected methods found
$_defaultConfig
N/A
No private methods found
No private properties found
N/A

Properties

$_defaultConfig

$_defaultConfig : array

Default configuration for this adapter.

Type

array

Methods

__construct()

__construct(array $config)

Constructor.

Parameters

array $config

Configurable options

name()

name(string|null $name) : string

Gets or set Adapter's name.

Parameters

string|null $name

The name to set, or null to get current name.

Returns

string —

Adapter name, e.g. reCAPTCHA

settings()

settings(\Cake\View\View $view) : string

Renders Form input elements for holding configurable parameters that users can tweak (private key, public key, etc).

Parameters

\Cake\View\View $view

The view instance for which form elements should be rendered

Returns

string —

HTML containing form inputs (text boxes, check boxes, etc)

render()

render(\Cake\View\View $view) : string

Renders the CAPTCHA element for later use in web form.

Parameters

\Cake\View\View $view

The view instance for which the CAPTCHA should be rendered

Returns

string —

HTML

validate()

validate(\Cake\Network\Request $request) : boolean

Validates the given POST information.

Parameters

\Cake\Network\Request $request

Current request object, commonly used to extract POST or Session information.

Returns

boolean —

True if valid, false otherwise