PHP Класс RecaptchaPlugin, vanilla

Наследование: extends Plugin
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$privateKey string reCAPTCHA private key
$publicKey string reCAPTCHA public key

Открытые методы

Метод Описание
__construct ( ) Plugin initialization.
captcha_get_handler ( Gdn_PluginManager $sender ) Hook to return captcha submission data.
captcha_isEnabled_handler ( Gdn_PluginManager $sender, array $args ) Hook to indicate a captcha service is available.
captcha_render_handler ( Gdn_Controller $sender ) Hook (view) to render a captcha.
captcha_settings_handler ( SettingsController $sender ) Hook (view) to manage captcha config.
captcha_validate_handler ( Gdn_PluginManager $sender ) : boolean Hook to validate captchas.
gdn_form_captcha_handler ( Gdn_Form $sender ) : string Display reCAPTCHA entry field.
getPrivateKey ( ) : string Get private key from memory.
getPublicKey ( ) : string Get public key from memory.
setPrivateKey ( string $key ) Override private key in memory.
setPublicKey ( string $key ) Override public key in memory.
settingsController_registration_handler ( SettingsController $sender ) Hook (controller) to manage captcha config.
setup ( ) On plugin enable.
validateCaptcha ( string $captchaText ) : boolean Validate a reCAPTCHA submission.

Описание методов

__construct() публичный Метод

Plugin initialization.
public __construct ( )

captcha_get_handler() публичный Метод

Hook to return captcha submission data.
public captcha_get_handler ( Gdn_PluginManager $sender )
$sender Gdn_PluginManager

captcha_isEnabled_handler() публичный Метод

Hook to indicate a captcha service is available.
public captcha_isEnabled_handler ( Gdn_PluginManager $sender, array $args )
$sender Gdn_PluginManager
$args array

captcha_render_handler() публичный Метод

THIS METHOD ECHOS DATA
public captcha_render_handler ( Gdn_Controller $sender )
$sender Gdn_Controller

captcha_settings_handler() публичный Метод

THIS METHOD ECHOS DATA
public captcha_settings_handler ( SettingsController $sender )
$sender SettingsController

captcha_validate_handler() публичный Метод

Hook to validate captchas.
public captcha_validate_handler ( Gdn_PluginManager $sender ) : boolean
$sender Gdn_PluginManager
Результат boolean

gdn_form_captcha_handler() публичный Метод

THIS METHOD ECHOS DATA
public gdn_form_captcha_handler ( Gdn_Form $sender ) : string
$sender Gdn_Form
Результат string

getPrivateKey() публичный Метод

Get private key from memory.
public getPrivateKey ( ) : string
Результат string

getPublicKey() публичный Метод

Get public key from memory.
public getPublicKey ( ) : string
Результат string

setPrivateKey() публичный Метод

Override private key in memory.
public setPrivateKey ( string $key )
$key string

setPublicKey() публичный Метод

Override public key in memory.
public setPublicKey ( string $key )
$key string

settingsController_registration_handler() публичный Метод

Hook (controller) to manage captcha config.
public settingsController_registration_handler ( SettingsController $sender )
$sender SettingsController

setup() публичный Метод

On plugin enable.
public setup ( )

validateCaptcha() публичный Метод

Validate a reCAPTCHA submission.
public validateCaptcha ( string $captchaText ) : boolean
$captchaText string
Результат boolean

Описание свойств

$privateKey защищенное свойство

reCAPTCHA private key
protected string $privateKey
Результат string

$publicKey защищенное свойство

reCAPTCHA public key
protected string $publicKey
Результат string