API Documentation

Form/Element/Captcha.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
subpackage
Element
version
$Id: Captcha.php 22329 2010-05-30 15:12:58Z bittarman $
Classes
Zend_Form_Element_Captcha

Description

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.

Zend_Form_Element_Captcha

Extends from
Zend_Form_Element_Xhtml
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
see
http://en.wikipedia.org/wiki/Captcha
subpackage
Element
Constants
CAPTCHA
Properties
$_captcha
Methods
getCaptcha
setCaptcha
__construct
getAttribs
setOptions
render
getPluginLoader
addPrefixPath
loadDefaultDecorators
isValid

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.

Constants

CAPTCHA

 CAPTCHA = 'CAPTCHA'

Captcha plugin type constant

Details

value
CAPTCHA

Properties

$_captcha

Zend_Captcha_Adapter $_captcha = ''

Captcha adapter

Details

$_captcha
Zend_Captcha_Adapter
visibility
protected
default
final
false
static
false

Methods

__construct

__construct( string|array|Zend_Config $spec,  $options = null ) : void

Constructor

$spec may be: - string: name of element - array: options with which to configure element - Zend_Config: Zend_Config with options for configuring element

Arguments
$spec
stringarrayZend_Config
$options
Details
visibility
public
final
false
static
false

addPrefixPath

addPrefixPath( string $prefix, string $path, string $type = null ) : Zend_Form_Element

Add prefix path for plugin loader for captcha adapters

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

Arguments
$prefix
string
$path
string
$type
string
Details
visibility
public
final
false
static
false
see
Zend_Form_Element::addPrefixPath

getAttribs

getAttribs( ) : array

Return all attributes

Output
array
Details
visibility
public
final
false
static
false

getCaptcha

getCaptcha( ) : Zend_Captcha_Adapter

Get captcha adapter

Details
visibility
public
final
false
static
false

getPluginLoader

getPluginLoader( string $type ) : Zend_Loader_PluginLoader

Retrieve plugin loader for validator or filter chain

Support for plugin loader for Captcha adapters

Arguments
$type
string
Details
visibility
public
final
false
static
false
throws
on invalid type.

isValid

isValid( mixed $value, mixed $context = null ) : boolean

Is the captcha valid?

Arguments
$value
mixed
$context
mixed
Output
boolean
Details
visibility
public
final
false
static
false

loadDefaultDecorators

loadDefaultDecorators( ) : void

Load default decorators

Details
visibility
public
final
false
static
false

render

render( Zend_View_Interface $view = null ) : string

Render form element

Arguments
$view
Zend_View_Interface
Output
string
Details
visibility
public
final
false
static
false

setCaptcha

setCaptcha( string|array|Zend_Captcha_Adapter $captcha, array $options = array ) :

Set captcha adapter

Arguments
$captcha
stringarrayZend_Captcha_Adapter
$options
array
Details
visibility
public
final
false
static
false

setOptions

setOptions( array $options ) : Zend_Form_Element_Captcha

Set options

Overrides to allow passing captcha options

Arguments
$options
array
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.