PHP Class RecaptchaBehavior

Inheritance: extends ModelBehavior
Show file Open project: cakedc/recaptcha

Public Properties

Property Type Description
$defaults array Default settings
$settings array Settings array

Public Methods

Method Description
beforeValidate ( Model $Model, array $options = [] ) : boolean Validates the captcha
setup ( Model $Model, array $settings = [] ) : void Setup
validateCaptcha ( Model $Model ) : boolean Validates the captcha responses status set by the component to the model

Method Details

beforeValidate() public method

Validates the captcha
public beforeValidate ( Model $Model, array $options = [] ) : boolean
$Model Model Model using this behavior
$options array Options passed from Model::save()
return boolean

setup() public method

Setup
public setup ( Model $Model, array $settings = [] ) : void
$Model Model Model using this behavior
$settings array Configuration settings for $model
return void

validateCaptcha() public method

Validates the captcha responses status set by the component to the model
See also: RecaptchaComponent::initialize()
public validateCaptcha ( Model $Model ) : boolean
$Model Model Model using this behavior
return boolean

Property Details

$defaults public property

Default settings
public array $defaults
return array

$settings public property

Settings array
public array $settings
return array