Zend Framework
1.12
|
Public Member Functions | |
getImgAlt () | |
getStartImage () | |
getDotNoiseLevel () | |
getLineNoiseLevel () | |
getExpiration () | |
Get captcha expiration. | |
getGcFreq () | |
Get garbage collection frequency. | |
getFont () | |
Get font to use when generating captcha. | |
getFontSize () | |
Get font size. | |
getHeight () | |
Get captcha image height. | |
getImgDir () | |
Get captcha image directory. | |
getImgUrl () | |
Get captcha image base URL. | |
getSuffix () | |
Get captcha image file suffix. | |
getWidth () | |
Get captcha image width. | |
setStartImage ($startImage) | |
setDotNoiseLevel ($dotNoiseLevel) | |
setLineNoiseLevel ($lineNoiseLevel) | |
setExpiration ($expiration) | |
Set captcha expiration. | |
setGcFreq ($gcFreq) | |
Set garbage collection frequency. | |
setFont ($font) | |
Set captcha font. | |
setFontSize ($fsize) | |
Set captcha font size. | |
setHeight ($height) | |
Set captcha image height. | |
setImgDir ($imgDir) | |
Set captcha image storage directory. | |
setImgUrl ($imgUrl) | |
Set captcha image base URL. | |
setImgAlt ($imgAlt) | |
setSuffix ($suffix) | |
Set captch image filename suffix. | |
setWidth ($width) | |
Set captcha image width. | |
generate () | |
Generate captcha. | |
render (Zend_View_Interface $view=null, $element=null) | |
Display the captcha. | |
![]() | |
getSessionClass () | |
Retrieve session class to utilize. | |
setSessionClass ($_sessionClass) | |
Set session class for persistence. | |
getWordlen () | |
Retrieve word length to use when genrating captcha. | |
setWordlen ($wordlen) | |
Set word length of captcha. | |
getId () | |
Retrieve captcha ID. | |
setTimeout ($ttl) | |
Set timeout for session token. | |
getTimeout () | |
Get session token timeout. | |
setKeepSession ($keepSession) | |
Sets if session should be preserved on generate() | |
getUseNumbers () | |
Numbers should be included in the pattern? | |
setUseNumbers ($_useNumbers) | |
Set if numbers should be included in the pattern. | |
getSession () | |
Get session object. | |
setSession (Zend_Session_Namespace $session) | |
Set session namespace object. | |
getWord () | |
Get captcha word. | |
generate () | |
Generate new session ID and new word. | |
isValid ($value, $context=null) | |
Validate the word. | |
getDecorator () | |
Get captcha decorator. | |
![]() | |
getName () | |
Get name. | |
setName ($name) | |
Set name. | |
__construct ($options=null) | |
Constructor. | |
setOption ($key, $value) | |
Set single option for the object. | |
setOptions ($options=null) | |
Set object state from options array. | |
getOptions () | |
Retrieve options representing object state. | |
setConfig (Zend_Config $config) | |
Set object state from config object. | |
getDecorator () | |
Get optional decorator. | |
![]() | |
getMessages () | |
Returns array of validation failure messages. | |
getMessageVariables () | |
Returns an array of the names of variables that are used in constructing validation failure messages. | |
getMessageTemplates () | |
Returns the message templates from the validator. | |
setMessage ($messageString, $messageKey=null) | |
Sets the validation failure message template for a particular key. | |
setMessages (array $messages) | |
Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings. | |
__get ($property) | |
Magic function returns the value of the requested property, if and only if it is the value or a message variable. | |
getErrors () | |
Returns array of validation failure message codes. | |
setObscureValue ($flag) | |
Set flag indicating whether or not value should be obfuscated in messages. | |
getObscureValue () | |
Retrieve flag indicating whether or not value should be obfuscated in messages. | |
setTranslator ($translator=null) | |
Set translation object. | |
getTranslator () | |
Return translation object. | |
hasTranslator () | |
Does this validator have its own specific translator? | |
setDisableTranslator ($flag) | |
Indicate whether or not translation should be disabled. | |
translatorIsDisabled () | |
Is translation disabled? | |
![]() | |
isValid ($value) | |
Returns true if and only if $value meets the validation requirements. | |
Protected Member Functions | |
_randomFreq () | |
Generate random frequency. | |
_randomPhase () | |
Generate random phase. | |
_randomSize () | |
Generate random character size. | |
_generateImage ($id, $word) | |
Generate image captcha. | |
_gc () | |
Remove old files from image directory. | |
![]() | |
_setId ($id) | |
Set captcha identifier. | |
_setWord ($word) | |
Set captcha word. | |
_generateWord () | |
Generate new random word. | |
_generateRandomId () | |
Protected Attributes | |
$_imgDir = "./images/captcha/" | |
$_imgUrl = "/images/captcha/" | |
$_imgAlt = "" | |
$_suffix = ".png" | |
$_width = 200 | |
$_height = 50 | |
$_fsize = 24 | |
$_font | |
$_startImage | |
$_gcFreq = 10 | |
$_expiration = 600 | |
$_dotNoiseLevel = 100 | |
$_lineNoiseLevel = 5 | |
![]() | |
$_id | |
$_word | |
$_session | |
$_sessionClass = 'Zend_Session_Namespace' | |
$_useNumbers = true | |
$_timeout = 300 | |
$_keepSession = false | |
$_messageTemplates | |
$_wordlen = 8 | |
![]() | |
$_name | |
$_options = array() | |
$_skipOptions | |
![]() | |
$_value | |
$_messageVariables = array() | |
$_messageTemplates = array() | |
$_messages = array() | |
$_obscureValue = false | |
$_errors = array() | |
$_translator | |
$_translatorDisabled = false | |
Additional Inherited Members | |
![]() | |
static | setDefaultTranslator ($translator=null) |
Set default translation object for all validate objects. | |
static | getDefaultTranslator () |
Get default translation object for all validate objects. | |
static | hasDefaultTranslator () |
Is there a default translation object set? | |
static | getMessageLength () |
Returns the maximum allowed message length. | |
static | setMessageLength ($length=-1) |
Sets the maximum allowed message length. | |
![]() | |
const | MISSING_VALUE = 'missingValue' |
#@+ Error codes | |
const | MISSING_ID = 'missingID' |
const | BAD_CAPTCHA = 'badCaptcha' |
![]() | |
static | $V = array("a", "e", "i", "o", "u", "y") |
static | $VN = array("a", "e", "i", "o", "u", "y","2","3","4","5","6","7","8","9") |
static | $C = array("b","c","d","f","g","h","j","k","m","n","p","q","r","s","t","u","v","w","x","z") |
static | $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 | $_defaultTranslator |
static | $_messageLength = -1 |
|
protected |
Remove old files from image directory.
|
protected |
Generate image captcha.
Override this function if you want different image generator Wave transform from http://www.captcha.ru/captchas/multiwave/
string | $id | Captcha ID |
string | $word | Captcha word |
|
protected |
Generate random frequency.
|
protected |
Generate random phase.
|
protected |
Generate random character size.
generate | ( | ) |
getDotNoiseLevel | ( | ) |
getExpiration | ( | ) |
Get captcha expiration.
getFont | ( | ) |
Get font to use when generating captcha.
getFontSize | ( | ) |
Get font size.
getGcFreq | ( | ) |
Get garbage collection frequency.
getHeight | ( | ) |
Get captcha image height.
getImgAlt | ( | ) |
getImgDir | ( | ) |
Get captcha image directory.
getImgUrl | ( | ) |
Get captcha image base URL.
getLineNoiseLevel | ( | ) |
getStartImage | ( | ) |
getSuffix | ( | ) |
Get captcha image file suffix.
getWidth | ( | ) |
Get captcha image width.
render | ( | Zend_View_Interface | $view = null , |
$element = null |
|||
) |
Display the captcha.
Zend_View_Interface | $view | |
mixed | $element |
Implements Zend_Captcha_Adapter.
setDotNoiseLevel | ( | $dotNoiseLevel | ) |
int | $dotNoiseLevel |
setExpiration | ( | $expiration | ) |
setFont | ( | $font | ) |
setFontSize | ( | $fsize | ) |
setGcFreq | ( | $gcFreq | ) |
setHeight | ( | $height | ) |
setImgAlt | ( | $imgAlt | ) |
string | $imgAlt |
setImgDir | ( | $imgDir | ) |
setImgUrl | ( | $imgUrl | ) |
setLineNoiseLevel | ( | $lineNoiseLevel | ) |
int | $lineNoiseLevel |
setStartImage | ( | $startImage | ) |
string | $startImage |
setSuffix | ( | $suffix | ) |
setWidth | ( | $width | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |