Пример #1
0
 private function getLoginCaptchaInstance()
 {
     // Captcha parameters:
     $captchaConfig = ['CaptchaId' => 'LoginCaptcha', 'UserInputId' => 'CaptchaCode', 'CaptchaConfigFilePath' => 'captcha_config/LoginCaptchaConfig.php'];
     $captcha = BotDetectCaptcha::GetCaptchaInstance($captchaConfig);
     return $captcha;
 }
Пример #2
0
 private function getExampleCaptchaInstance()
 {
     // Captcha parameters
     $captchaConfig = ['CaptchaId' => 'ExampleCaptcha', 'UserInputId' => 'CaptchaCode', 'CaptchaConfigFilePath' => 'captcha_config/ExampleCaptchaConfig.php'];
     return BotDetectCaptcha::GetCaptchaInstance($captchaConfig);
 }
Пример #3
0
 /**
  * Get captcha instance to handle for the reset password page
  *
  * @return object
  */
 private function getResetPasswordCaptchaInstance()
 {
     // Captcha parameters:
     $captchaConfig = ['CaptchaId' => 'ResetPasswordCaptcha', 'UserInputId' => 'CaptchaCode', 'CaptchaConfigFilePath' => 'captcha_config/ResetPasswordCaptchaConfig.php'];
     return BotDetectCaptcha::GetCaptchaInstance($captchaConfig);
 }
Пример #4
0
     * Disable instance creation.
     */
    private function __construct()
    {
    }
    /**
     * Get an instance of the Captcha class.
     *
     * @param  array  $p_Config
     * @return object
     */
    public static function GetCaptchaInstance($p_Config = array())
    {
        if (!isset(self::$m_Captcha)) {
            self::$m_Captcha = new BotDetectCaptchaHelper($p_Config);
        }
        return self::$m_Captcha;
    }
    /**
     * Get BotDetect Laravel CAPTCHA composer package information.
     *
     * @return array
     */
    public static function GetProductInfo()
    {
        return self::$ProductInfo;
    }
}
// static field initialization
BotDetectCaptcha::$ProductInfo = ['name' => 'BotDetect PHP Captcha integration for the Laravel framework', 'version' => '3.2.1'];