Interface AdapterInterface

Summary

Fully Qualified Name: Zend\Captcha\AdapterInterface
Extends: ValidatorInterface

Description

Generic Captcha adapter interface

Each specific captcha implementation should implement this interface

Methods

Name Description Defined By
generate() Generate a new captcha AdapterInterface
getHelperName() Get helper name to use when rendering this captcha type AdapterInterface
getMessages() Returns an array of messages that explain why the most recent isValid() call returned false. The array keys are validation failure message identifiers, and the array values are the corresponding human-readable message strings. ValidatorInterface
getName() Get captcha name AdapterInterface
isValid() Returns true if and only if $value meets the validation requirements ValidatorInterface
setName() Set captcha name AdapterInterface

Method Details

generate()

Generate a new captcha

Returns: string new captcha ID

getHelperName()

Get helper name to use when rendering this captcha type

Returns: string

getMessages()

Returns an array of messages that explain why the most recent isValid() call returned false. The array keys are validation failure message identifiers, and the array values are the corresponding human-readable message strings.

If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.

Returns: array

getName()

Get captcha name

Returns: string

isValid()

Returns true if and only if $value meets the validation requirements

If $value fails validation, then this method returns false, and getMessages() will return an array of messages that explain why the validation failed.

Parameter Name Type Description
$value mixed

Returns: bool

setName()

Set captcha name

Parameter Name Type Description
$name string

Returns: \AdapterInterface

Top