Fully Qualified Name: | Laminas\Captcha\AdapterInterface |
Extends: | ValidatorInterface |
Generic Captcha adapter interface
Each specific captcha implementation should implement this interface
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 |
Generate a new captcha
Returns: string new captcha ID
Get helper name to use when rendering this captcha type
Returns: string
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
Get captcha name
Returns: string
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
Set captcha name
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: \AdapterInterface