- md5
- 7fc8e8c949270d0f19cb1f8397c73b51
- sha1
- 2ba803ae1bedf0b204fec206f0b1f7cc0ec61536
- sha256
- 78a885c054d406678183c2e41a80d23cfee4c007d34fd12b0804a8674b80f78b
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 onSetSubject(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 149 releases, Joomla 5.0.0-beta3 to 6.2.1-rc1. See them all, or every version of this file.