- md5
- 4fe1da7ed4229c2abb2319ee757bbf16
- sha1
- 3031d2831e1cf37a8888d0412aa1390f13438669
- sha256
- 1aef301dfe247f25d05f0f35396248c3c27c0bd978ae641b69a4b10f9d9fe56b
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
<?php
/**
* Joomla! Content Management System
*
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Event\Captcha;
use Joomla\CMS\Captcha\CaptchaRegistry;
use Joomla\CMS\Event\AbstractImmutableEvent;
/**
* Captcha setup event
*
* @since 5.0.0
*/
class CaptchaSetupEvent extends AbstractImmutableEvent
{
/**
* Constructor.
*
* @param string $name The event name.
* @param array $arguments The event arguments.
*
* @throws \BadMethodCallException
*
* @since 5.0.0
*/
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
throw new \BadMethodCallException("Argument 'subject' of event {$name} is required but has not been provided");
}
parent::__construct($name, $arguments);
}
/**
* Setter for the subject argument
*
* @param CaptchaRegistry $value The value to set
*
* @return CaptchaRegistry
*
* @since 5.0.0
*/
protected function setSubject(CaptchaRegistry $value): CaptchaRegistry
{
return $value;
}
/**
* Returns Captcha Registry instance.
*
* @return CaptchaRegistry
*
* @since 5.0.0
*/
public function getCaptchaRegistry(): CaptchaRegistry
{
return $this->getArgument('subject');
}
}
The same content is in 3 releases, Joomla 5.0.0-alpha4 to 5.0.0-beta2. See them all, or every version of this file.