HTML_QuickForm2_Element_Captcha_TextCAPTCHA __construct(
[string
$name = null], [mixed
$attributes = null], [array
$data = array()])
|
|
Constructor. Set adapter specific data attributes.
Text_CAPTCHA settings are provided in $data. $data['captchaType'] specifies the Text_CAPTCHA driver name, e.g. "Equation", "Figlet" or "Word". All other $data settings are passed to it's init() method.
Do not use this class directly for the "Image" type, there is an own class for that one.
Overridden in child classes as:
- HTML_QuickForm2_Element_Captcha_Image::__construct()
- Set adapter specific data attributes.
Overrides
HTML_QuickForm2_Element_Captcha::__construct() (Create new instance.)
Parameters:
Returns the HTML for the captcha question and answer.
Used in __toString() and to be used when $data['captchaRender'] is set to false.
Overrides
HTML_QuickForm2_Element_Captcha::getCaptchaHtml() (Returns the HTML for the captcha (question + input element if applicable))
Checks if the captcha is solved now.
Uses $capSolved variable or user input, which is compared with the pre-set correct answer.
Calls generateCaptcha() if it has not been called before.
In case user solution and answer match, a session variable is set so that the captcha is seen as completed across form submissions.
Overrides
HTML_QuickForm2_Element_Captcha::verifyCaptcha() (Checks if the captcha is solved now.)