PHP Class RecaptchaHelper

Inheritance: extends AppHelper
Afficher le fichier Open project: cakedc/recaptcha

Méthodes publiques

Свойство Type Description
$apiUrl string API Url
$helpers array View helpers

Protected Properties

Свойство Type Description
$callback string Callback function name (fot explicit rendering)
$explicit array Items to render explicitly

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
__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

Method Details

afterRender() public méthode

public afterRender ( $viewFile )

display() public méthode

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.
Résultat string The resulting mark up

mailHide() public méthode

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
Résultat string

mailHideUrl() public méthode

Gets the reCAPTCHA Mailhide url for a given email
public mailHideUrl ( string $email = null ) : string
$email string An email address
Résultat string

signupUrl() public méthode

Recaptcha signup URL
public signupUrl ( string $appName = null ) : string
$appName string An application name
Résultat string A signup url

Property Details

$apiUrl public_oe property

API Url
public string $apiUrl
Résultat string

$callback protected_oe property

Callback function name (fot explicit rendering)
protected string $callback
Résultat string

$explicit protected_oe property

Items to render explicitly
protected array $explicit
Résultat array

$helpers public_oe property

View helpers
public array $helpers
Résultat array