renderImageByGD() protected method Renders the CAPTCHA image based on the code using GD library. protected string renderImageByGD ( $code )$code string The verification code return string Image contents in PNG format.
getVerifyCode() public method Gets the verification code. public string getVerifyCode ( $regenerate = false )$regenerate boolean Whether the verification code should be regenerated. return string The verification code.
generateVerifyCode() protected method Generates a new verification code. protected string generateVerifyCode ( )return string The generated verification code
getSessionKey() protected method Returns the session variable name used to store verification code. protected string getSessionKey ( )return string The session variable name
init() public method Initializes the action. public void init ( )throws yii\base\InvalidConfigException if the font file does not exist.
renderImage() protected method Renders the CAPTCHA image. protected string renderImage ( $code )$code string The verification code return string Image contents throws yii\base\InvalidConfigException if imageLibrary is not supported
$testLimit public property 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). public integer $testLimit = 3
generateValidationHash() public method Generates a hash code that can be used for client-side validation. public string generateValidationHash ( $code )$code string The CAPTCHA code return string A hash code generated from the CAPTCHA code
$verifyCode public read-only property The verification code. public string getVerifyCode ( $regenerate = false )
$width public property The width of the generated CAPTCHA image. Defaults to 120. public integer $width = 120
Page 510 of 633