Class plgCaptchaRecaptcha

Description

Recaptcha Plugin.

Based on the oficial recaptcha library( http://recaptcha.net/plugins/php/ )

  • since: 2.5

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

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"
Method Summary
plgCaptchaRecaptcha __construct ( $subject,  $config)
True onCheckAnswer ( $code)
string onDisplay ( $name,  $id,  $class)
Boolean onInit (string $id)
string _getLanguage ()
array _recaptcha_http_post (string $host, string $path, array $data, [int $port = 80])
string _recaptcha_qsencode (string $data)
Variables

Inherited Variables

Inherited from JPlugin

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

Inherited from JEvent

JEvent::$_subject

Inherited from JObject

JObject::$_errors
Methods
Constructor __construct (line 28)
  • access: public
plgCaptchaRecaptcha __construct ( $subject,  $config)
  • $subject
  • $config

Redefinition of:
JPlugin::__construct()
Constructor
onCheckAnswer (line 89)

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 77)

Gets the challenge HTML

  • return: The HTML to be embedded in the form.
  • since: 2.5
  • access: public
string onDisplay ( $name,  $id,  $class)
  • $name
  • $id
  • $class
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.
_getLanguage (line 213)

Get the language tag or a custom translation

  • since: 2.5
  • access: private
string _getLanguage ()
_recaptcha_http_post (line 174)

Submits an HTTP POST to a reCAPTCHA server.

  • return: Response
  • since: 2.5
  • access: private
array _recaptcha_http_post (string $host, string $path, array $data, [int $port = 80])
  • string $host
  • string $path
  • array $data
  • int $port
_recaptcha_qsencode (line 149)

Encodes the given data into a query string format.

  • return: Encoded request
  • since: 2.5
  • access: private
string _recaptcha_qsencode (string $data)
  • string $data: Array of string elements to be encoded

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()
JObject::__toString()
Class Constants
RECAPTCHA_API_SECURE_SERVER = "https://www.google.com/recaptcha/api" (line 25)
RECAPTCHA_API_SERVER = "http://api.recaptcha.net" (line 24)
RECAPTCHA_VERIFY_SERVER = "api-verify.recaptcha.net" (line 26)

Documentation generated on Mon, 25 Jun 2012 13:59:03 -0500 by phpDocumentor 1.4.4