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.
Image-based captcha element
Generates image displaying random word
int $_dotNoiseLevel = '100'
Number of noise dots on image Used twice - before and after transform
int $_expiration = '600'
How long to keep generated images
string $_font = ''
Image font file
int $_fsize = '24'
Font size
int $_gcFreq = '10'
How frequently to execute garbage collection
int $_height = '50'
Image height
string $_imgAlt = ''
Image's alt tag content
string $_imgDir = './images/captcha/'
Directory for generated images
string $_imgUrl = '/images/captcha/'
URL for accessing images
int $_lineNoiseLevel = '5'
Number of noise lines on image Used twice - before and after transform
string $_startImage = ''
Image to use as starting point Default is blank image. If provided, should be PNG image.
string $_suffix = '.png'
Image suffix (including dot)
int $_width = '200'
Image width
_gc(
)
:
Remove old files from image directory
_generateImage(
string $id, string $word
)
:
Generate image captcha
Override this function if you want different image generator Wave transform from http://www.captcha.ru/captchas/multiwave/
_randomFreq(
)
:
float
Generate random frequency
_randomPhase(
)
:
float
Generate random phase
_randomSize(
)
:
int
Generate random character size
generate(
)
:
string
Generate captcha
getDotNoiseLevel(
)
:
int
getExpiration(
)
:
int
Get captcha expiration
getFont(
)
:
string
Get font to use when generating captcha
getFontSize(
)
:
int
Get font size
getGcFreq(
)
:
int
Get garbage collection frequency
getHeight(
)
:
int
Get captcha image height
getImgAlt(
)
:
string
getImgDir(
)
:
string
Get captcha image directory
getImgUrl(
)
:
string
Get captcha image base URL
getLineNoiseLevel(
)
:
int
getStartImage(
)
:
string
getSuffix(
)
:
string
Get captcha image file suffix
getWidth(
)
:
int
Get captcha image width
render(
Zend_View_Interface $view
=
null, mixed $element
=
null
)
:
string
Display the captcha
setDotNoiseLevel(
int $dotNoiseLevel
)
:
setExpiration(
int $expiration
)
:
Zend_Captcha_Image
Set captcha expiration
setFont(
string $font
)
:
Zend_Captcha_Image
Set captcha font
setFontSize(
int $fsize
)
:
Zend_Captcha_Image
Set captcha font size
setGcFreq(
int $gcFreq
)
:
Zend_Captcha_Image
Set garbage collection frequency
setHeight(
int $height
)
:
Zend_Captcha_Image
Set captcha image height
setImgAlt(
string $imgAlt
)
:
setImgDir(
string $imgDir
)
:
Zend_Captcha_Image
Set captcha image storage directory
setImgUrl(
string $imgUrl
)
:
Zend_Captcha_Image
Set captcha image base URL
setLineNoiseLevel(
int $lineNoiseLevel
)
:
setStartImage(
string $startImage
)
:
setSuffix(
string $suffix
)
:
Zend_Captcha_Image
Set captch image filename suffix
setWidth(
int $width
)
:
Zend_Captcha_Image
Set captcha image width