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 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 init()

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

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 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 generateVerifyCode()

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

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 $width

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

captcha\CaptchaAction $verifyCode

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

captcha\CaptchaAction $transparent

$transparent public property Whether to use transparent background. Defaults to false. public boolean $transparent = false