/**
* Class constructor.
*
* @param string $captcha The plugin to use.
* @param array $options Associative array of options.
*
* @since 2.5
* @throws \RuntimeException
*/
public function __construct($captcha, $options)
{
$this->name = $captcha;
if (!empty($options['dispatcher']) && $options['dispatcher'] instanceof DispatcherInterface) {
$this->setDispatcher($options['dispatcher']);
} else {
$this->setDispatcher(Factory::getApplication()->getDispatcher());
}
$this->_load($options);
}