captcha\CaptchaAction renderImageByGD()

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.

captcha\CaptchaAction getVerifyCode()

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.

captcha\CaptchaAction generateVerifyCode()

generateVerifyCode() protected method Generates a new verification code. protected string generateVerifyCode ( )return string The generated verification code

captcha\CaptchaAction getSessionKey()

getSessionKey() protected method Returns the session variable name used to store verification code. protected string getSessionKey ( )return string The session variable name

captcha\CaptchaAction init()

init() public method Initializes the action. public void init ( )throws yii\base\InvalidConfigException if the font file does not exist.

captcha\CaptchaAction renderImage()

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

captcha\CaptchaAction $testLimit

$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

captcha\CaptchaAction generateValidationHash()

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

captcha\CaptchaAction $verifyCode

$verifyCode public read-only property The verification code. public string getVerifyCode ( $regenerate = false )

captcha\CaptchaAction $width

$width public property The width of the generated CAPTCHA image. Defaults to 120. public integer $width = 120