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.
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
init() public method Initializes the action. public void init ( )throws yii\base\InvalidConfigException if the font file does not exist.
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.
getSessionKey() protected method Returns the session variable name used to store verification code. protected string getSessionKey ( )return string The session variable name
generateVerifyCode() protected method Generates a new verification code. protected string generateVerifyCode ( )return string The generated verification code
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
$width public property The width of the generated CAPTCHA image. Defaults to 120. public integer $width = 120
$verifyCode public read-only property The verification code. public string getVerifyCode ( $regenerate = false )
$transparent public property Whether to use transparent background. Defaults to false. public boolean $transparent = false
Page 510 of 633