Implementation for Question & Answer CAPTCHA.

package XenForo_Captcha

 Methods

To string method to warn if the CAPTCHA hasn't been rendered properly.

__toString() : string
Inherited
inherited_from \XenForo_Captcha_Abstract::__toString()

Returns

string

Creates the default CAPTCHA handler.

createDefault(boolean $alwaysCreate) : \XenForo_Captcha_Abstract | false
InheritedStatic

By default, this checks whether a CAPTCHA is needed for the visiting user. Note that you can never guarantee that this function will return an object!

inherited_from \XenForo_Captcha_Abstract::createDefault()

Parameters

$alwaysCreate

boolean

If false, creates if visiting user needs; otherwise, creates the default object if configured

Returns

Determines if CAPTCHA is valid (passed).

isValid(array $input) : boolean
see \XenForo_Captcha_Abstract::isValid()

Parameters

$input

array

Set of input to validate against

Returns

boolean

render()

render(\XenForo_View $view) 
Inherited
inherited_from \XenForo_Captcha_Abstract::render()

Parameters

$view

Renders the CAPTCHA template.

renderInternal(\XenForo_View $view) : \XenForo_Template_Abstract | string

This should only render the CAPTCHA area itself. The CAPTCHA may be used in a form row or own its own.

see \XenForo_Captcha_Abstract::renderInternal()

Parameters

Returns

Validates the default CAPTCHA handler.

validateDefault(array | \XenForo_Input $input, boolean $alwaysCheck) : boolean
InheritedStatic
inherited_from \XenForo_Captcha_Abstract::validateDefault()

Parameters

$input

array\XenForo_Input

Input to check

$alwaysCheck

boolean

If true, always checks; if false, checks if visiting user needs

Returns

boolean

 Properties

 

$_rendered : \XenForo_Template_Abstract | string | null
Inherited
inherited_from \XenForo_Captcha_Abstract::$$_rendered