Captcha
class Captcha extends JObject
Joomla! Captcha base object
Methods
__construct(
string $captcha,
array $options)
Class constructor.
static
Captcha|null
getInstance(
string $captcha,
array $options = array())
Returns the global Captcha object, only creating it if it doesn't already exist.
boolean
initialise(
string $id)
Fire the onInit event to initialise the captcha plugin.
mixed
display(
string $name,
string $id,
string $class = '')
Get the HTML for the captcha.
bool
checkAnswer(
string $code)
Checks if the answer is correct.
void
setupField(
CaptchaField $field,
SimpleXMLElement $element)
Method to react on the setup of a captcha field. Gives the possibility to change the field and/or the XML element for the field.
mixed
getState()
Get the state of the Captcha object
void
attach(
object $observer)
Attach an observer object
boolean
detach(
object $observer)
Detach an observer object
Details
static
Captcha|null
getInstance(
string $captcha,
array $options = array())
Returns the global Captcha object, only creating it if it doesn't already exist.
void
setupField(
CaptchaField $field,
SimpleXMLElement $element)
Method to react on the setup of a captcha field. Gives the possibility to change the field and/or the XML element for the field.