Class Zend_Form_Element_Captcha

Description

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.

Located in /Form/Element/Captcha.php (line 44)

Zend_Form_Element
   |
   --Zend_Form_Element_Xhtml
      |
      --Zend_Form_Element_Captcha
Class Constant Summary
 CAPTCHA = 'CAPTCHA'
Variable Summary
Method Summary
 void __construct (string|array|Zend_Config $spec, [ $options = null])
 Zend_Form_Element addPrefixPath (string $prefix, string $path, [string $type = null])
 array getAttribs ()
 boolean isValid (mixed $value, [mixed $context = null])
 string render ([ $view = null])
 void setCaptcha (string|array|Zend_Captcha_Adapter $captcha, [array $options = array()])
Variables
Methods
Constructor __construct (line 120)

Constructor

$spec may be:

  • string: name of element
  • array: options with which to configure element
  • Zend_Config: Zend_Config with options for configuring element

  • access: public
void __construct (string|array|Zend_Config $spec, [ $options = null])

Redefinition of:
Zend_Form_Element::__construct()
Constructor
addPrefixPath (line 233)

Add prefix path for plugin loader for captcha adapters

This method handles the captcha type, the rest is handled by the parent

  • see: Zend_Form_Element::addPrefixPath
  • access: public
Zend_Form_Element addPrefixPath (string $prefix, string $path, [string $type = null])
  • string $prefix
  • string $path
  • string $type

Redefinition of:
Zend_Form_Element::addPrefixPath()
Add prefix path for plugin loader
getAttribs (line 134)

Return all attributes

  • access: public
array getAttribs ()

Redefinition of:
Zend_Form_Element::getAttribs()
Return all attributes
getCaptcha (line 63)

Get captcha adapter

  • access: public
Zend_Captcha_Adapter getCaptcha ()
getPluginLoader (line 206)

Retrieve plugin loader for validator or filter chain

Support for plugin loader for Captcha adapters

  • throws: Zend_Loader_Exception on invalid type.
  • access: public
Zend_Loader_PluginLoader getPluginLoader (string $type)
  • string $type

Redefinition of:
Zend_Form_Element::getPluginLoader()
Retrieve plugin loader for validator or filter chain
isValid (line 279)

Is the captcha valid?

  • access: public
boolean isValid (mixed $value, [mixed $context = null])
  • mixed $value
  • mixed $context

Redefinition of:
Zend_Form_Element::isValid()
Validate element value
loadDefaultDecorators (line 257)

Load default decorators

  • access: public
void loadDefaultDecorators ()

Redefinition of:
Zend_Form_Element::loadDefaultDecorators()
Load default decorators
render (line 175)

Render form element

  • access: public
string render ([ $view = null])

Redefinition of:
Zend_Form_Element::render()
Render form element
setCaptcha (line 74)

Set captcha adapter

  • access: public
void setCaptcha (string|array|Zend_Captcha_Adapter $captcha, [array $options = array()])
setOptions (line 155)

Set options

Overrides to allow passing captcha options

  • access: public
Zend_Form_Element_Captcha setOptions ( $options)
  • array $options

Redefinition of:
Zend_Form_Element::setOptions()
Set object state from options array

Inherited Methods

Inherited From Zend_Form_Element

 Zend_Form_Element::__construct()
 Zend_Form_Element::addDecorator()
 Zend_Form_Element::addDecorators()
 Zend_Form_Element::addError()
 Zend_Form_Element::addErrorMessage()
 Zend_Form_Element::addErrorMessages()
 Zend_Form_Element::addErrors()
 Zend_Form_Element::addFilter()
 Zend_Form_Element::addFilters()
 Zend_Form_Element::addPrefixPath()
 Zend_Form_Element::addPrefixPaths()
 Zend_Form_Element::addValidator()
 Zend_Form_Element::addValidators()
 Zend_Form_Element::autoInsertNotEmptyValidator()
 Zend_Form_Element::clearDecorators()
 Zend_Form_Element::clearErrorMessages()
 Zend_Form_Element::clearFilters()
 Zend_Form_Element::clearValidators()
 Zend_Form_Element::filterName()
 Zend_Form_Element::getAllowEmpty()
 Zend_Form_Element::getAttrib()
 Zend_Form_Element::getAttribs()
 Zend_Form_Element::getBelongsTo()
 Zend_Form_Element::getDecorator()
 Zend_Form_Element::getDecorators()
 Zend_Form_Element::getDescription()
 Zend_Form_Element::getErrorMessages()
 Zend_Form_Element::getErrorMessageSeparator()
 Zend_Form_Element::getErrors()
 Zend_Form_Element::getFilter()
 Zend_Form_Element::getFilters()
 Zend_Form_Element::getFullyQualifiedName()
 Zend_Form_Element::getId()
 Zend_Form_Element::getIgnore()
 Zend_Form_Element::getLabel()
 Zend_Form_Element::getMessages()
 Zend_Form_Element::getName()
 Zend_Form_Element::getOrder()
 Zend_Form_Element::getPluginLoader()
 Zend_Form_Element::getTranslator()
 Zend_Form_Element::getType()
 Zend_Form_Element::getUnfilteredValue()
 Zend_Form_Element::getValidator()
 Zend_Form_Element::getValidators()
 Zend_Form_Element::getValue()
 Zend_Form_Element::getView()
 Zend_Form_Element::hasErrors()
 Zend_Form_Element::init()
 Zend_Form_Element::isArray()
 Zend_Form_Element::isRequired()
 Zend_Form_Element::isValid()
 Zend_Form_Element::loadDefaultDecorators()
 Zend_Form_Element::loadDefaultDecoratorsIsDisabled()
 Zend_Form_Element::markAsError()
 Zend_Form_Element::removeDecorator()
 Zend_Form_Element::removeFilter()
 Zend_Form_Element::removeValidator()
 Zend_Form_Element::render()
 Zend_Form_Element::setAllowEmpty()
 Zend_Form_Element::setAttrib()
 Zend_Form_Element::setAttribs()
 Zend_Form_Element::setAutoInsertNotEmptyValidator()
 Zend_Form_Element::setBelongsTo()
 Zend_Form_Element::setConfig()
 Zend_Form_Element::setDecorators()
 Zend_Form_Element::setDescription()
 Zend_Form_Element::setDisableLoadDefaultDecorators()
 Zend_Form_Element::setDisableTranslator()
 Zend_Form_Element::setErrorMessages()
 Zend_Form_Element::setErrorMessageSeparator()
 Zend_Form_Element::setErrors()
 Zend_Form_Element::setFilters()
 Zend_Form_Element::setIgnore()
 Zend_Form_Element::setIsArray()
 Zend_Form_Element::setLabel()
 Zend_Form_Element::setName()
 Zend_Form_Element::setOptions()
 Zend_Form_Element::setOrder()
 Zend_Form_Element::setPluginLoader()
 Zend_Form_Element::setRequired()
 Zend_Form_Element::setTranslator()
 Zend_Form_Element::setValidators()
 Zend_Form_Element::setValue()
 Zend_Form_Element::setView()
 Zend_Form_Element::translatorIsDisabled()
 Zend_Form_Element::_filterValue()
 Zend_Form_Element::_getDecorator()
 Zend_Form_Element::_getErrorMessages()
 Zend_Form_Element::_hasErrorMessages()
 Zend_Form_Element::_loadDecorator()
 Zend_Form_Element::_loadFilter()
 Zend_Form_Element::_loadValidator()
 Zend_Form_Element::__call()
 Zend_Form_Element::__get()
 Zend_Form_Element::__set()
 Zend_Form_Element::__toString()
Class Constants
CAPTCHA = 'CAPTCHA' (line 49)

Captcha plugin type constant

Inherited Constants

Inherited from Zend_Form_Element

Zend_Form_Element::DECORATOR
Zend_Form_Element::FILTER
Zend_Form_Element::VALIDATE

Documentation generated on Thu, 01 Apr 2010 12:58:02 -0400 by phpDocumentor 1.4.3