PHP Класс RecaptchaHelper

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

Открытые свойства

Свойство Тип Описание
$apiUrl string API Url
$helpers array View helpers

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

Свойство Тип Описание
$callback string Callback function name (fot explicit rendering)
$explicit array Items to render explicitly

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

Метод Описание
afterRender ( $viewFile )
display ( array $options = [] ) : string Displays the Recaptcha input
mailHide ( string $email ) : string Gets html to display an email address given a public an private key to get a key go to: https://www.google.com/recaptcha/mailhide/apikey
mailHideUrl ( string $email = null ) : string Gets the reCAPTCHA Mailhide url for a given email
signupUrl ( string $appName = null ) : string Recaptcha signup URL

Приватные методы

Метод Описание
__aesEncrypt ( string $value, string $key ) : string AES Encryption
__aesPad ( string $val ) : string AES Pad
__hideEmailParts ( string $email ) : array Get a part of the email to show
__mailhideUrlbase64 ( string $x ) : string Mail-hide URL

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

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

public afterRender ( $viewFile )

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

Displays the Recaptcha input
public display ( array $options = [] ) : string
$options array An array of options ### Options: - `element` String, name of the view element that can be used instead of the hardcoded HTML structure from this helper - `explicit` reCAPTCHA rendering method. Set to true when rendering multiple reCAPTCHAs on a page - `error` String, optional error message that is displayed using Form::error() - `div` Array of options for the div tag the recaptcha is wrapped with, set to false if you want to disable it - `lang` Forces the widget to render in a specific language - `recaptchaOptions` assoc array of options to pass into RecaptchaOptions var, like 'sitekey' (default is read from Configure::read('Recaptcha.publicKey')), 'theme', 'type', 'size.
Результат string The resulting mark up

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

Gets html to display an email address given a public an private key to get a key go to: https://www.google.com/recaptcha/mailhide/apikey
public mailHide ( string $email ) : string
$email string An email address
Результат string

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

Gets the reCAPTCHA Mailhide url for a given email
public mailHideUrl ( string $email = null ) : string
$email string An email address
Результат string

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

Recaptcha signup URL
public signupUrl ( string $appName = null ) : string
$appName string An application name
Результат string A signup url

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

$apiUrl публичное свойство

API Url
public string $apiUrl
Результат string

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

Callback function name (fot explicit rendering)
protected string $callback
Результат string

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

Items to render explicitly
protected array $explicit
Результат array

$helpers публичное свойство

View helpers
public array $helpers
Результат array