Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Generic captcha element
This element allows to insert CAPTCHA into the form in order to validate that human is submitting the form. The actual logic is contained in the captcha adapter.
Zend_Captcha_Adapter $_captcha = ''Captcha adapter
Details__construct(
string|array|Zend_Config $spec, $options
=
null
)
:
voidConstructor
$spec may be: - string: name of element - array: options with which to configure element - Zend_Config: Zend_Config with options for configuring element
DetailsaddPrefixPath(
string $prefix, string $path, string $type
=
null
)
:
Zend_Form_ElementAdd prefix path for plugin loader for captcha adapters
This method handles the captcha type, the rest is handled by the parent
DetailsgetAttribs(
)
:
arrayReturn all attributes
DetailsgetCaptcha(
)
:
Zend_Captcha_AdapterGet captcha adapter
DetailsgetPluginLoader(
string $type
)
:
Zend_Loader_PluginLoaderRetrieve plugin loader for validator or filter chain
Support for plugin loader for Captcha adapters
DetailsisValid(
mixed $value, mixed $context
=
null
)
:
booleanIs the captcha valid?
DetailsloadDefaultDecorators(
)
:
voidLoad default decorators
Detailsrender(
Zend_View_Interface $view
=
null
)
:
stringRender form element
DetailssetCaptcha(
string|array|Zend_Captcha_Adapter $captcha, array $options
=
array
)
:
Set captcha adapter
DetailssetOptions(
array $options
)
:
Zend_Form_Element_CaptchaSet options
Overrides to allow passing captcha options
Details