Word-based captcha adapter
Generates random word which user should recognise
category | Zend |
---|---|
package | Zend_Captcha |
subpackage | Adapter |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
version | $Id$ |
inherited_from | \Zend_Captcha_Base |
__construct(array|\Zend_Config $options = null
)
array
\Zend_Config
__get(string $property) : mixed
string
\Zend_Validate_Exception |
---|
mixed
generate() : string
string
session IDgetDecorator() : string
By default, return null, indicating no extra decorator needed.
inherited_from | \Zend_Captcha_Base::getDecorator() |
---|
string
getDecorator() : null
By default, return null, indicating no extra decorator needed.
inherited_from | \Zend_Captcha_Adapter::getDecorator() |
---|
null
getDefaultTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
getErrors() : array
deprecated | Since 1.5.0 |
---|
array
getId() : string
string
getMessageLength() : integer
integer
getMessageTemplates() : array
array
getMessageVariables() : array
array
getMessages() : array
If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.
inherited_from | \Zend_Validate_Interface::getMessages() |
---|
array
getName() : string
inherited_from | \Zend_Captcha_Adapter::getName() |
---|
string
getObscureValue() : boolean
boolean
getOptions() : array
array
getSession() : \Zend_Session_Namespace
\Zend_Session_Namespace
getSessionClass() : string
string
getTimeout() : integer
integer
getTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
getUseNumbers() : boolean
boolean
getWord() : string
string
getWordlen() : integer
integer
hasDefaultTranslator() : boolean
boolean
hasTranslator() : boolean
boolean
isValid(mixed $value, array|null $context = null
) : boolean
setConfig(\Zend_Config $config) : \Zend_Captcha_Base
\Zend_Config
\Zend_Captcha_Base
setDefaultTranslator(\Zend_Translate|\Zend_Translate_Adapter|null $translator = null
)
\Zend_Translate
\Zend_Translate_Adapter
null
\Zend_Validate_Exception |
---|
setDisableTranslator(boolean $flag) : \Zend_Validate_Abstract
boolean
\Zend_Validate_Abstract
setKeepSession(boolean $keepSession) : \Zend_Captcha_Word
boolean
Should session be kept on generate()?
\Zend_Captcha_Word
setMessage(string $messageString, string $messageKey = null
) : \Zend_Validate_Abstract
string
string
OPTIONAL
\Zend_Validate_Exception |
---|
\Zend_Validate_Abstract
Provides a fluent interfacesetMessageLength(integer $length = -1
)
integer
setMessages(array $messages) : \Zend_Validate_Abstract
array
\Zend_Validate_Abstract
setName(string $name) : \Zend_Captcha_Adapter
inherited_from | \Zend_Captcha_Adapter::setName() |
---|
string
\Zend_Captcha_Adapter
setObscureValue(boolean $flag) : \Zend_Validate_Abstract
boolean
\Zend_Validate_Abstract
setOption(string $key, string $value) : \Zend_Form_Element
string
string
\Zend_Form_Element
setOptions(array $options = null
) : \Zend_Form_Element
array
\Zend_Form_Element
setSession(\Zend_Session_Namespace $session) : \Zend_Captcha_Word
\Zend_Session_Namespace
\Zend_Captcha_Word
setSessionClass(string $_sessionClass) : \Zend_Captcha_Word
string
\Zend_Captcha_Word
setTimeout(integer $ttl) : \Zend_Captcha_Word
integer
\Zend_Captcha_Word
setTranslator(\Zend_Translate|\Zend_Translate_Adapter|null $translator = null
) : \Zend_Validate_Abstract
\Zend_Translate
\Zend_Translate_Adapter
null
\Zend_Validate_Exception |
---|
\Zend_Validate_Abstract
setUseNumbers(boolean $_useNumbers) : \Zend_Captcha_Word
boolean
numbers should be included in the pattern?
\Zend_Captcha_Word
setWordlen(integer $wordlen) : \Zend_Captcha_Word
integer
\Zend_Captcha_Word
translatorIsDisabled() : boolean
boolean
_createMessage(string $messageKey, string $value) : string
Returns null if and only if $messageKey does not correspond to an existing template.
If a translator is available and a translation exists for $messageKey, the translation will be used.
string
string
string
_error(string $messageKey, string $value = null
) : void
string
string
OPTIONAL
_generateRandomId()
_generateWord() : string
string
_implodeRecursive(array $pieces) : string
array
string
_setId(string $id) : \Zend_Captcha_Word
string
\Zend_Captcha_Word
_setValue(mixed $value) : void
mixed
_setWord(string $word) : \Zend_Captcha_Word
string
\Zend_Captcha_Word
$C
array("b", "c", "d", "f", "g", "h", "j", "k", "m", "n", "p", "q", "r", "s", "t", "u", "v", "w", "x", "z")
$CN
array("b", "c", "d", "f", "g", "h", "j", "k", "m", "n", "p", "q", "r", "s", "t", "u", "v", "w", "x", "z", "2", "3", "4", "5", "6", "7", "8", "9")
$V
array("a", "e", "i", "o", "u", "y")
$VN
array("a", "e", "i", "o", "u", "y", "2", "3", "4", "5", "6", "7", "8", "9")
$_defaultTranslator : \Zend_Translate
$_errors : array
array()
deprecated | Since 1.5.0 |
---|
$_id : string
$_keepSession : boolean
false
$_name : string
Useful to generate/check form fields
$_obscureValue : boolean
false
$_session : \Zend_Session_Namespace
$_sessionClass : string
'Zend_Session_Namespace'
$_skipOptions : array
array('options', 'config')
$_timeout : integer
300
$_translator : \Zend_Translate
$_translatorDisabled : Boolean
false
$_useNumbers : boolean
true
$_value : mixed
$_word : string
$_wordlen : integer
8
BAD_CAPTCHA = 'badCaptcha'
MISSING_ID = 'missingID'
MISSING_VALUE = 'missingValue'