Captcha/Word.php

Show: PublicProtectedPrivateinherited
Table of Contents
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.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Captcha  
Subpackage
Adapter  

\Zend_Captcha_Word

Package: Zend_Captcha\Adapter
Word-based captcha adapter
Generates random word which user should recognise
Parent(s)
\Zend_Captcha_Base < \Zend_Validate_Abstract
Children
\Zend_Captcha_Figlet
\Zend_Captcha_Image
\Zend_Captcha_Dumb
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id$  

Constants

>VConstant  MISSING_VALUE = 'missingValue'
>VConstant  MISSING_ID = 'missingID'
>VConstant  BAD_CAPTCHA = 'badCaptcha'

Properties

>VPropertypublic$C = array("b", "c", "d", "f", "g", "h", "j", "k", "m", "n", "p", "q", "r", "s", "t", "u", "v", "w", "x", "z")
static
Default valuearray("b", "c", "d", "f", "g", "h", "j", "k", "m", "n", "p", "q", "r", "s", "t", "u", "v", "w", "x", "z")Details
Type
n/a
>VPropertypublic$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")
static
Default valuearray("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")Details
Type
n/a
>VPropertypublic$V = array("a", "e", "i", "o", "u", "y")
static
Default valuearray("a", "e", "i", "o", "u", "y")Details
Type
n/a
>VPropertypublic$VN = array("a", "e", "i", "o", "u", "y", "2", "3", "4", "5", "6", "7", "8", "9")
static
Default valuearray("a", "e", "i", "o", "u", "y", "2", "3", "4", "5", "6", "7", "8", "9")Details
Type
n/a

Methods

methodpublicgenerate() : string

Generate new session ID and new word

Returns
TypeDescription
stringsession ID
methodpublicgetDecorator() : string

Get captcha decorator

Returns
TypeDescription
string
methodpublicgetId() : string

Retrieve captcha ID

Returns
TypeDescription
string
methodpublicgetSession() : \Zend_Session_Namespace

Get session object

Returns
TypeDescription
\Zend_Session_Namespace
methodpublicgetSessionClass() : string

Retrieve session class to utilize

Returns
TypeDescription
string
methodpublicgetTimeout() : int

Get session token timeout

Returns
TypeDescription
int
methodpublicgetUseNumbers() : bool

Numbers should be included in the pattern?

Returns
TypeDescription
bool
methodpublicgetWord() : string

Get captcha word

Returns
TypeDescription
string
methodpublicgetWordlen() : integer

Retrieve word length to use when genrating captcha

Returns
TypeDescription
integer
methodpublicisValid(mixed $value,  $context = null) : boolean

Validate the word

Parameters
NameTypeDescription
$valuemixed
$context
Returns
TypeDescription
boolean
Details
See
 
methodpublicsetKeepSession(bool $keepSession) : \Zend_Captcha_Word

Sets if session should be preserved on generate()

Parameters
NameTypeDescription
$keepSessionbool

Should session be kept on generate()?

Returns
TypeDescription
\Zend_Captcha_Word
methodpublicsetSession(\Zend_Session_Namespace $session) : \Zend_Captcha_Word

Set session namespace object

Parameters
NameTypeDescription
$session\Zend_Session_Namespace
Returns
TypeDescription
\Zend_Captcha_Word
methodpublicsetSessionClass(string $_sessionClass) : \Zend_Captcha_Word

Set session class for persistence

Parameters
NameTypeDescription
$_sessionClassstring
Returns
TypeDescription
\Zend_Captcha_Word
methodpublicsetTimeout(int $ttl) : \Zend_Captcha_Word

Set timeout for session token

Parameters
NameTypeDescription
$ttlint
Returns
TypeDescription
\Zend_Captcha_Word
methodpublicsetUseNumbers(bool $_useNumbers) : \Zend_Captcha_Word

Set if numbers should be included in the pattern

Parameters
NameTypeDescription
$_useNumbersbool

numbers should be included in the pattern?

Returns
TypeDescription
\Zend_Captcha_Word
methodpublicsetWordlen(integer $wordlen) : \Zend_Captcha_Word

Set word length of captcha

Parameters
NameTypeDescription
$wordleninteger
Returns
TypeDescription
\Zend_Captcha_Word
Documentation was generated by phpDocumentor 2.2.0 .