Class JCaptcha

Description

Joomla! Captcha base object

  • abstract:
  • since: 2.5

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

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

Captcha Plugin object

  • access: private
object $_captcha (line 54)

Captcha Plugin object

  • since: 2.5
  • access: private
array $_methods = array() (line 46)

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

  • since: 2.5
  • access: protected
string $_name (line 62)

Editor Plugin name

  • since: 2.5
  • access: private
array $_observers = array() (line 30)

An array of Observer objects to notify

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

The state of the observable object

  • since: 2.5
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
static method getInstance (line 96)

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

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

Class constructor.

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

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

Attach an observer object

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

Checks if the answer is correct.

  • return: return value of the function "onCheckAnswer" of the selected Plugin.
  • since: 2.5
  • access: public
the checkAnswer ( $code)
  • $code
detach (line 316)

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

Get the HTML for the captcha.

  • return: return value of the function "onDisplay" of the selected Plugin.
  • since: 2.5
  • access: public
the display ( $name,  $id, [ $class = ''])
  • $name
  • $id
  • $class
getState (line 234)

Get the state of the JEditor object

  • return: The state of the object.
  • since: 2.5
  • access: public
mixed getState ()
initialise (line 121)
  • return: True on success
  • since: 2.5
  • access: public
boolean initialise ( $id)
  • $id
_load (line 199)

Load the Captcha plug-in.

  • since: 2.5
  • throws: RuntimeException
  • access: private
void _load ([array $options = array()])
  • array $options: Associative array of options.

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()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:52:43 -0500 by phpDocumentor 1.4.4