public static \Joomla\CMS\Captcha\Captcha|null
getInstance
(mixed $captcha, array $options = array())
/**
* Returns the global Captcha object, only creating it
* if it doesn't already exist.
*
* @param string $captcha The plugin to use.
* @param array $options Associative array of options.
*
* @return Captcha|null Instance of this class.
*
* @since 2.5
* @throws \RuntimeException
*/
public static function getInstance($captcha, array $options = array())
{
$signature = md5(serialize(array($captcha, $options)));
if (empty(self::$instances[$signature])) {
self::$instances[$signature] = new Captcha($captcha, $options);
}
return self::$instances[$signature];
}