$backColor 公共 属性
The background color. For example, 0x55FF00.
Defaults to 0xFFFFFF, meaning white color.
$fixedVerifyCode 公共 属性
The fixed verification code. When this property is set,
getVerifyCode() will always return the value of this property.
This is mainly used in automated tests where we want to be able to reproduce
the same verification code each time we run the tests.
If not set, it means the verification code will be randomly generated.
$fontFile 公共 属性
The TrueType font file. This can be either a file path or path alias.
public $fontFile ='@yii/captcha/SpicyRice.ttf'
$foreColor 公共 属性
The font color. For example, 0x55FF00. Defaults to 0x2040A0 (blue color).
$height 公共 属性
The height of the generated CAPTCHA image. Defaults to 50.
$imageLibrary 公共 属性
(自版本 2.0.7 可用)
The rendering library to use. Currently supported only 'gd' and 'imagick'.
If not set, library will be determined automatically.
$maxLength 公共 属性
The maximum length for randomly generated word. Defaults to 7.
$minLength 公共 属性
The minimum length for randomly generated word. Defaults to 6.
$offset 公共 属性
The offset between characters. Defaults to -2. You can adjust this property
in order to decrease or increase the readability of the captcha.
$padding 公共 属性
Padding around the text. Defaults to 2.
$testLimit 公共 属性
How many times should the same CAPTCHA be displayed. Defaults to 3.
A value less than or equal to 0 means the test is unlimited (available since version 1.1.2).
$transparent 公共 属性
Whether to use transparent background. Defaults to false.
$verifyCode 公共 只读 属性
The verification code.
public $regenerate=false )
$width 公共 属性
The width of the generated CAPTCHA image. Defaults to 120.