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.
Word-based captcha adapter
Generates random word which user should recognise
MISSING_VALUE = 'missingValue'
Details MISSING_ID = 'missingID'
Details BAD_CAPTCHA = 'badCaptcha'
Details $C = 'array'
Details $CN = 'array'
Details $V = 'array'
Details $VN = 'array'
Detailsstring $_id = ''Random session ID
Detailsboolean $_keepSession = 'false'Should generate() keep session or create a new one?
Detailsarray $_messageTemplates = 'array'Error messages
DetailsZend_Session_Namespace $_session = ''Session
Detailsstring $_sessionClass = 'Zend_Session_Namespace'Class name for sessions
Detailsinteger $_timeout = '300'Session lifetime for the captcha data
Detailsboolean $_useNumbers = 'true'Should the numbers be used or only letters
Detailsstring $_word = ''Generated word
Detailsinteger $_wordlen = '8'Length of the word to generate
Details_generateRandomId(
)
:
Details_generateWord(
)
:
stringGenerate new random word
Details_setId(
string $id
)
:
Set captcha identifier
Details_setWord(
string $word
)
:
Zend_Captcha_WordSet captcha word
Detailsgenerate(
)
:
stringGenerate new session ID and new word
DetailsgetDecorator(
)
:
stringGet captcha decorator
DetailsgetId(
)
:
stringRetrieve captcha ID
DetailsgetSession(
)
:
Zend_Session_NamespaceGet session object
DetailsgetSessionClass(
)
:
stringRetrieve session class to utilize
DetailsgetTimeout(
)
:
intGet session token timeout
DetailsgetWord(
)
:
stringGet captcha word
DetailsgetWordlen(
)
:
integerRetrieve word length to use when genrating captcha
DetailsisValid(
mixed $value, $context
=
null
)
:
booleanValidate the word
DetailssetKeepSession(
$keepSession $keepSession
)
:
Zend_Captcha_WordSets if session should be preserved on generate()
DetailssetSession(
Zend_Session_Namespace $session
)
:
Zend_Captcha_WordSet session namespace object
DetailssetSessionClass(
string $_sessionClass
)
:
Zend_Captcha_WordSet session class for persistence
DetailssetTimeout(
int $ttl
)
:
Zend_Captcha_WordSet timeout for session token
DetailssetWordlen(
integer $wordlen
)
:
Zend_Captcha_WordSet word length of captcha
Details