Abstract Class JCaptcha

Description

Joomla! Captcha base object

  • abstract:
  • since: 2.5

Located in /libraries/cms/captcha/captcha.php (line 20)

JObject
   |
   --JCaptcha
Variable Summary
 array $_methods
 array $_observers
 mixed $_state
Method Summary
 static JCaptcha getInstance (string $captcha, [array $options = array()])
 JCaptcha __construct (string $captcha, array $options)
 void attach (object $observer)
 mixed checkAnswer (string $code)
 boolean detach (object $observer)
 mixed display (string $name, string $id, [string $class = ''])
 mixed getState ()
 boolean initialise (string $id)
Variables
array $_methods = array() (line 44)

A multi dimensional array of [function][] = key for observers

  • since: 2.5
  • access: protected
array $_observers = array() (line 28)

An array of Observer objects to notify

  • since: 2.5
  • access: protected
mixed $_state = null (line 36)

The state of the observable object

  • since: 2.5
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
static getInstance (line 94)

Returns the global Captcha object, only creating it if it doesn't already exist.

  • return: Instance of this class.
  • since: 2.5
  • access: public
static JCaptcha getInstance (string $captcha, [array $options = array()])
  • string $captcha: The plugin to use.
  • array $options: Associative array of options.
Constructor __construct (line 77)

Class constructor.

  • since: 2.5
  • access: public
JCaptcha __construct (string $captcha, array $options)
  • string $captcha: The editor to use.
  • array $options: Associative array of options.

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
attach (line 256)

Attach an observer object

  • since: 2.5
  • access: public
void attach (object $observer)
  • object $observer: An observer object to attach
checkAnswer (line 183)

Checks if the answer is correct.

  • return: The return value of the function "onCheckAnswer" of the selected Plugin.
  • since: 2.5
  • access: public
mixed checkAnswer (string $code)
  • string $code: The answer.
detach (line 324)

Detach an observer object

  • return: True if the observer object was detached.
  • since: 2.5
  • access: public
boolean detach (object $observer)
  • object $observer: An observer object to detach.
display (line 152)

Get the HTML for the captcha.

  • return: The return value of the function "onDisplay" of the selected Plugin.
  • since: 2.5
  • access: public
mixed display (string $name, string $id, [string $class = ''])
  • string $name: The control name.
  • string $id: The id for the control.
  • string $class: Value for the HTML class attribute
getState (line 242)

Get the state of the JEditor object

  • return: The state of the object.
  • since: 2.5
  • access: public
mixed getState ()
initialise (line 123)

Fire the onInit event to initialise the captcha plug-in.

  • return: True on success
  • since: 2.5
  • access: public
boolean initialise (string $id)
  • string $id: The id of the field.

Inherited Methods

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()

Documentation generated on Tue, 19 Nov 2013 14:55:03 +0100 by phpDocumentor 1.4.3