Class PlgCaptchaRecaptcha

Description

Recaptcha Plugin.

Based on the official recaptcha library( https://developers.google.com/recaptcha/docs/php )

  • since: 2.5

Located in /plugins/captcha/recaptcha/recaptcha.php (line 20)

JObject
   |
   --JEvent
      |
      --JPlugin
         |
         --PlgCaptchaRecaptcha
Class Constant Summary
 RECAPTCHA_API_SECURE_SERVER = "https://www.google.com/recaptcha/api"
 RECAPTCHA_API_SERVER = "http://api.recaptcha.net"
 RECAPTCHA_VERIFY_SERVER = "api-verify.recaptcha.net"
Variable Summary
Method Summary
 True onCheckAnswer ( $code)
 string onDisplay (string $name, string $id, string $class)
 Boolean onInit (string $id)
Variables
boolean $autoloadLanguage = true (line 32)

Load the language file on instantiation.

  • since: 3.1
  • access: protected

Redefinition of:
JPlugin::$autoloadLanguage
Affects constructor behavior. If true, language files will be loaded automatically.

Inherited Variables

Inherited from JPlugin

JPlugin::$params
JPlugin::$_name
JPlugin::$_type

Inherited from JEvent

JEvent::$_subject

Inherited from JObject

JObject::$_errors
Methods
onCheckAnswer (line 96)

Calls an HTTP POST function to verify if the user's guess was correct

  • return: if the answer is correct, false otherwise
  • since: 2.5
  • access: public
True onCheckAnswer ( $code)
  • $code
onDisplay (line 84)

Gets the challenge HTML

  • return: The HTML to be embedded in the form.
  • since: 2.5
  • access: public
string onDisplay (string $name, string $id, string $class)
  • string $name: The name of the field.
  • string $id: The id of the field.
  • string $class: The class of the field.
onInit (line 43)

Initialise the captcha

  • return: True on success, false otherwise
  • since: 2.5
  • access: public
Boolean onInit (string $id)
  • string $id: The id of the field.

Inherited Methods

Inherited From JPlugin

 JPlugin::__construct()
 JPlugin::loadLanguage()

Inherited From JEvent

 JEvent::__construct()
 JEvent::update()

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()
Class Constants
RECAPTCHA_API_SECURE_SERVER = "https://www.google.com/recaptcha/api" (line 23)
RECAPTCHA_API_SERVER = "http://api.recaptcha.net" (line 22)
RECAPTCHA_VERIFY_SERVER = "api-verify.recaptcha.net" (line 24)

Documentation generated on Tue, 19 Nov 2013 15:11:37 +0100 by phpDocumentor 1.4.3