API Documentation

Captcha/Word.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Captcha
subpackage
Adapter
Classes
Zend_Captcha_Word

Description

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.

Zend_Captcha_Word

Extends from
Zend_Captcha_Base
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Captcha
subpackage
Adapter
version
$Id: Word.php 20096 2010-01-06 02:05:09Z bkarwin $
Constants
MISSING_VALUE
MISSING_ID
BAD_CAPTCHA
Properties
$V
$VN
$C
$CN
$_id
$_word
$_session
$_sessionClass
$_useNumbers
$_timeout
$_keepSession
$_messageTemplates
$_wordlen
Methods
getSessionClass
setSessionClass
getWordlen
setWordlen
getId
_setId
setTimeout
getTimeout
setKeepSession
getSession
setSession
getWord
_setWord
_generateWord
generate
_generateRandomId
isValid
getDecorator

Description

Word-based captcha adapter

Generates random word which user should recognise

Constants

MISSING_VALUE

 MISSING_VALUE = 'missingValue'

Details

value
missingValue

MISSING_ID

 MISSING_ID = 'missingID'

Details

value
missingID

BAD_CAPTCHA

 BAD_CAPTCHA = 'badCaptcha'

Details

value
badCaptcha

Properties

$C

 $C = 'array'

Details

visibility
public
default
array
final
false
static
true

$CN

 $CN = 'array'

Details

visibility
public
default
array
final
false
static
true

$V

 $V = 'array'

Details

visibility
public
default
array
final
false
static
true

$VN

 $VN = 'array'

Details

visibility
public
default
array
final
false
static
true

$_id

string $_id = ''

Random session ID

Details

$_id
string
visibility
protected
default
final
false
static
false

$_keepSession

boolean $_keepSession = 'false'

Should generate() keep session or create a new one?

Details

$_keepSession
boolean
visibility
protected
default
false
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Error messages

Details

$_messageTemplates
array
visibility
protected
default
array
final
false
static
false

$_session

Zend_Session_Namespace $_session = ''

Session

Details

$_session
Zend_Session_Namespace
visibility
protected
default
final
false
static
false

$_sessionClass

string $_sessionClass = 'Zend_Session_Namespace'

Class name for sessions

Details

$_sessionClass
string
visibility
protected
default
Zend_Session_Namespace
final
false
static
false

$_timeout

integer $_timeout = '300'

Session lifetime for the captcha data

Details

$_timeout
integer
visibility
protected
default
300
final
false
static
false

$_useNumbers

boolean $_useNumbers = 'true'

Should the numbers be used or only letters

Details

$_useNumbers
boolean
visibility
protected
default
true
final
false
static
false

$_word

string $_word = ''

Generated word

Details

$_word
string
visibility
protected
default
final
false
static
false

$_wordlen

integer $_wordlen = '8'

Length of the word to generate

Details

$_wordlen
integer
visibility
protected
default
8
final
false
static
false

Methods

_generateRandomId

_generateRandomId( ) :
Details
visibility
protected
final
false
static
false

_generateWord

_generateWord( ) : string

Generate new random word

Output
string
Details
visibility
protected
final
false
static
false

_setId

_setId( string $id ) :

Set captcha identifier

Arguments
$id
string
return Zend_Captcha_Word
Details
visibility
protected
final
false
static
false

_setWord

_setWord( string $word ) : Zend_Captcha_Word

Set captcha word

Arguments
$word
string
Details
visibility
protected
final
false
static
false

generate

generate( ) : string

Generate new session ID and new word

Output
string
session ID
Details
visibility
public
final
false
static
false

getDecorator

getDecorator( ) : string

Get captcha decorator

Output
string
Details
visibility
public
final
false
static
false

getId

getId( ) : string

Retrieve captcha ID

Output
string
Details
visibility
public
final
false
static
false

getSession

getSession( ) : Zend_Session_Namespace

Get session object

Details
visibility
public
final
false
static
false

getSessionClass

getSessionClass( ) : string

Retrieve session class to utilize

Output
string
Details
visibility
public
final
false
static
false

getTimeout

getTimeout( ) : int

Get session token timeout

Output
int
Details
visibility
public
final
false
static
false

getWord

getWord( ) : string

Get captcha word

Output
string
Details
visibility
public
final
false
static
false

getWordlen

getWordlen( ) : integer

Retrieve word length to use when genrating captcha

Output
integer
Details
visibility
public
final
false
static
false

isValid

isValid( mixed $value,  $context = null ) : boolean

Validate the word

Arguments
$value
mixed
$context
Output
boolean
Details
visibility
public
final
false
static
false
see
Zend_Validate_Interface::isValid()

setKeepSession

setKeepSession( $keepSession $keepSession ) : Zend_Captcha_Word

Sets if session should be preserved on generate()

Arguments
$keepSession
$keepSession
Should session be kept on generate()?
Details
visibility
public
final
false
static
false

setSession

setSession( Zend_Session_Namespace $session ) : Zend_Captcha_Word

Set session namespace object

Arguments
$session
Zend_Session_Namespace
Details
visibility
public
final
false
static
false

setSessionClass

setSessionClass( string $_sessionClass ) : Zend_Captcha_Word

Set session class for persistence

Arguments
$_sessionClass
string
Details
visibility
public
final
false
static
false

setTimeout

setTimeout( int $ttl ) : Zend_Captcha_Word

Set timeout for session token

Arguments
$ttl
int
Details
visibility
public
final
false
static
false

setWordlen

setWordlen( integer $wordlen ) : Zend_Captcha_Word

Set word length of captcha

Arguments
$wordlen
integer
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.