File manager - Edit - /home/ferretapmx/public_html/User.tar
Back
AfterSaveEvent.php 0000644 00000004574 15231072344 0010152 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User save event. * Example: * new AfterSaveEvent('onEventName', ['subject' => $userArray, 'isNew' => $isNew, 'savingResult' => $result, 'errorMessage' => $errorStr]); * * @since 5.0.0 */ class AfterSaveEvent extends AbstractSaveEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject', 'isNew', 'savingResult', 'errorMessage']; /** * 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 = []) { parent::__construct($name, $arguments); if (!\array_key_exists('savingResult', $this->arguments)) { throw new \BadMethodCallException("Argument 'savingResult' of event {$name} is required but has not been provided"); } } /** * Setter for the savingResult argument. * * @param bool $value The value to set * * @return bool * * @since 5.0.0 */ protected function onSetSavingResult(bool $value): bool { return $value; } /** * Setter for the errorMessage argument. * * @param ?string $value The value to set * * @return ?string * * @since 5.0.0 */ protected function onSetErrorMessage(?string $value): ?string { return $value; } /** * Getter for the saving result. * * @return bool * * @since 5.0.0 */ public function getSavingResult(): bool { return $this->arguments['savingResult']; } /** * Getter for the error message. * * @return string * * @since 5.0.0 */ public function getErrorMessage(): string { return $this->arguments['errorMessage'] ?? ''; } } AbstractSaveEvent.php 0000644 00000004164 15231072344 0010647 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Base class for User save event * * @since 5.0.0 */ abstract class AbstractSaveEvent extends UserEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject', 'isNew']; /** * 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 = []) { parent::__construct($name, $arguments); if (!\array_key_exists('isNew', $this->arguments)) { throw new \BadMethodCallException("Argument 'isNew' of event {$name} is required but has not been provided"); } } /** * Setter for the subject argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetSubject(array $value): array { return $value; } /** * Setter for the isNew argument. * * @param bool $value The value to set * * @return bool * * @since 5.0.0 */ protected function onSetIsNew($value): bool { return (bool) $value; } /** * Getter for the user. * * @return array * * @since 5.0.0 */ public function getUser(): array { return $this->arguments['subject']; } /** * Getter for the isNew state. * * @return boolean * * @since 5.0.0 */ public function getIsNew(): bool { return $this->arguments['isNew']; } } LoginButtonsEvent.php 0000644 00000002651 15231072344 0010713 0 ustar 00 <?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\User; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; use Joomla\CMS\Event\Result\ResultTypeArrayAware; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new LoginButtonsEvent('onEventName', ['subject' => $formId]); * * @since 5.0.0 */ class LoginButtonsEvent extends UserEvent implements ResultAwareInterface { use ResultAware; use ResultTypeArrayAware; /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject']; /** * Setter for the subject argument. * * @param string $value The value to set * * @return string * * @since 5.0.0 */ protected function onSetSubject(string $value): string { return $value; } /** * Getter for the formId. * * @return string * * @since 5.0.0 */ public function getFormId(): string { return $this->arguments['subject']; } } AbstractLoginEvent.php 0000644 00000004712 15231072344 0011020 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Base class for User login event * * @since 5.0.0 */ abstract class AbstractLoginEvent extends UserEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject', 'options']; /** * Constructor. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException * * @since 5.2.0 */ public function __construct($name, array $arguments = []) { if (\count($arguments) === 1) { // @TODO: Remove in Joomla 7, and set 'options' argument as required. $missingKey = empty($arguments['subject']) ? 'subject' : 'options'; $arguments[key($arguments) === 0 ? 1 : $missingKey] = []; @trigger_error( \sprintf('The event %s requires 2 arguments. Use of 1 argument will throw an exception in Joomla 7.', $this->getName()), E_USER_DEPRECATED ); } parent::__construct($name, $arguments); } /** * Setter for the subject argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetSubject(array $value): array { return $value; } /** * Setter for the options argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetOptions(array $value): array { return $value; } /** * Getter for the response. * * @return array * * @since 5.0.0 */ public function getAuthenticationResponse(): array { return $this->arguments['subject']; } /** * Getter for the options. * * @return array * * @since 5.0.0 */ public function getOptions(): array { return $this->arguments['options'] ?? []; } } AbstractLogoutEvent.php 0000644 00000004702 15231072344 0011220 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Base class for User logout event * * @since 5.0.0 */ abstract class AbstractLogoutEvent extends UserEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject', 'options']; /** * Constructor. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException * * @since 5.2.0 */ public function __construct($name, array $arguments = []) { if (\count($arguments) === 1) { // @TODO: Remove in Joomla 7, and set 'options' argument as required. $missingKey = empty($arguments['subject']) ? 'subject' : 'options'; $arguments[key($arguments) === 0 ? 1 : $missingKey] = []; @trigger_error( \sprintf('The event %s requires 2 arguments. Use of 1 argument will throw an exception in Joomla 7.', $this->getName()), E_USER_DEPRECATED ); } parent::__construct($name, $arguments); } /** * Setter for the subject argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetSubject(array $value): array { return $value; } /** * Setter for the options argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetOptions(array $value): array { return $value; } /** * Getter for the parameters. * * @return array * * @since 5.0.0 */ public function getParameters(): array { return $this->arguments['subject']; } /** * Getter for the options. * * @return array * * @since 5.0.0 */ public function getOptions(): array { return $this->arguments['options'] ?? []; } } AbstractDeleteEvent.php 0000644 00000002205 15231072344 0011145 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Base class for User delete event * * @since 5.0.0 */ abstract class AbstractDeleteEvent extends UserEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject']; /** * Setter for the subject argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetSubject(array $value): array { return $value; } /** * Getter for the user. * * @return array * * @since 5.0.0 */ public function getUser(): array { return $this->arguments['subject']; } } UserEvent.php 0000644 00000003056 15231072344 0007202 0 ustar 00 <?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\User; use Joomla\CMS\Event\AbstractImmutableEvent; use Joomla\CMS\Event\ReshapeArgumentsAware; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Base class for User events * * @since 5.0.0 */ abstract class UserEvent extends AbstractImmutableEvent { use ReshapeArgumentsAware; /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = []; /** * 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 = []) { // Reshape the arguments array to preserve b/c with legacy listeners if ($this->legacyArgumentsOrder) { $arguments = $this->reshapeArguments($arguments, $this->legacyArgumentsOrder); } parent::__construct($name, $arguments); if (!\array_key_exists('subject', $this->arguments)) { throw new \BadMethodCallException("Argument 'subject' of event {$name} is required but has not been provided"); } } } AuthenticationEvent.php 0000644 00000007054 15231072344 0011245 0 ustar 00 <?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\User; use Joomla\CMS\Authentication\Authentication; use Joomla\CMS\Authentication\AuthenticationResponse; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new AuthenticationEvent('onEventName', ['credentials' => $credentials, 'options' => $options, 'subject' => $authenticationResponse]); * * @since 5.0.0 */ class AuthenticationEvent extends UserEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['credentials', 'options', 'subject']; /** * 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 = []) { parent::__construct($name, $arguments); if (!\array_key_exists('credentials', $this->arguments)) { throw new \BadMethodCallException("Argument 'credentials' of event {$name} is required but has not been provided"); } } /** * Tell if the event propagation is stopped. * Also, the event considered "stopped" when AuthenticationResponse has STATUS_SUCCESS. * * @return boolean True if stopped, false otherwise. * * @since 5.0.0 */ public function isStopped() { if (parent::isStopped()) { return true; } // Check Response status $response = $this->getAuthenticationResponse(); if ($response->status === Authentication::STATUS_SUCCESS) { return true; } return false; } /** * Setter for the subject argument. * * @param AuthenticationResponse $value The value to set * * @return AuthenticationResponse * * @since 5.0.0 */ protected function onSetSubject(AuthenticationResponse $value): AuthenticationResponse { return $value; } /** * Setter for the credentials argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetCredentials(array $value): array { return $value; } /** * Setter for the options argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetOptions(array $value): array { return $value; } /** * Getter for the response. * * @return AuthenticationResponse * * @since 5.0.0 */ public function getAuthenticationResponse(): AuthenticationResponse { return $this->arguments['subject']; } /** * Getter for the credentials. * * @return array * * @since 5.0.0 */ public function getCredentials(): array { return $this->arguments['credentials']; } /** * Getter for the options. * * @return array * * @since 5.0.0 */ public function getOptions(): array { return $this->arguments['options'] ?? []; } } AfterRemindEvent.php 0000644 00000002277 15231072344 0010470 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new AfterRemindEvent('onEventName', ['subject' => $user]); * * @since 5.0.0 */ class AfterRemindEvent extends UserEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject']; /** * Setter for the subject argument. * * @param object $value The value to set * * @return object * * @since 5.0.0 */ protected function onSetSubject(object $value): object { return $value; } /** * Getter for the user. * * @return object * * @since 5.0.0 */ public function getUser(): object { return $this->arguments['subject']; } } AbstractResetEvent.php 0000644 00000002207 15231072344 0011027 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User reset event. * * @since 5.2.0 */ abstract class AbstractResetEvent extends UserEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.2.0 * @deprecated 5.2.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject']; /** * Setter for the subject argument. * * @param object $value The value to set * * @return object * * @since 5.2.0 */ protected function onSetSubject(object $value): object { return $value; } /** * Getter for the user. * * @return object * * @since 5.2.0 */ public function getUser(): object { return $this->arguments['subject']; } } AuthorisationEvent.php 0000644 00000005031 15231072344 0011110 0 ustar 00 <?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\User; use Joomla\CMS\Authentication\AuthenticationResponse; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new AuthorisationEvent('onEventName', ['subject' => $authenticationResponse, 'options' => $options]); * * @since 5.0.0 */ class AuthorisationEvent extends UserEvent implements ResultAwareInterface { use ResultAware; /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject', 'options']; /** * Setter for the subject argument. * * @param AuthenticationResponse $value The value to set * * @return AuthenticationResponse * * @since 5.0.0 */ protected function onSetSubject(AuthenticationResponse $value): AuthenticationResponse { return $value; } /** * Setter for the options argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetOptions(array $value): array { return $value; } /** * Checks the type of the data being appended to the result argument. * * @param mixed $data The data to type check * * @return void * @throws \InvalidArgumentException * * @internal * @since 5.0.0 */ public function typeCheckResult($data): void { if (!$data instanceof AuthenticationResponse) { throw new \InvalidArgumentException(\sprintf('Event %s only accepts AuthenticationResponse results.', $this->getName())); } } /** * Getter for the response. * * @return AuthenticationResponse * * @since 5.0.0 */ public function getAuthenticationResponse(): AuthenticationResponse { return $this->arguments['subject']; } /** * Getter for the options. * * @return array * * @since 5.0.0 */ public function getOptions(): array { return $this->arguments['options'] ?? []; } } AfterResetRequestEvent.php 0000644 00000001046 15231072344 0011676 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User reset event. * Example: * new AfterResetRequestEvent('onEventName', ['subject' => $user]); * * @since 5.2.0 */ class AfterResetRequestEvent extends AbstractResetEvent { } BeforeDeleteEvent.php 0000644 00000001043 15231072344 0010603 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User delete event. * Example: * new BeforeDeleteEvent('onEventName', ['subject' => $userArray]); * * @since 5.0.0 */ class BeforeDeleteEvent extends AbstractDeleteEvent { } LogoutFailureEvent.php 0000644 00000001066 15231072344 0011044 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new LogoutFailureEvent('onEventName', ['subject' => $parameters, 'options' => $options]); * * @since 5.0.0 */ class LogoutFailureEvent extends AbstractLogoutEvent { } AfterLoginEvent.php 0000644 00000001461 15231072344 0010314 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new AfterLoginEvent('onEventName', ['subject' => $authenticationResponseArray, 'options' => $options]); * * @since 5.0.0 */ class AfterLoginEvent extends AbstractLoginEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['options', 'subject']; } AuthorisationFailureEvent.php 0000644 00000003356 15231072344 0012430 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new AuthorisationFailureEvent('onEventName', ['subject' => $authenticationResponseArray, 'options' => $options]); * * @since 5.0.0 */ class AuthorisationFailureEvent extends UserEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject', 'options']; /** * Setter for the subject argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetSubject(array $value): array { return $value; } /** * Setter for the options argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetOptions(array $value): array { return $value; } /** * Getter for the response. * * @return array * * @since 5.0.0 */ public function getAuthenticationResponse(): array { return $this->arguments['subject']; } /** * Getter for the options. * * @return array * * @since 5.0.0 */ public function getOptions(): array { return $this->arguments['options'] ?? []; } } AfterLogoutEvent.php 0000644 00000001443 15231072344 0010515 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new AfterLogoutEvent('onEventName', ['subject' => $parameters, 'options' => $options]); * * @since 5.0.0 */ class AfterLogoutEvent extends AbstractLogoutEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['options', 'subject']; } BeforeResetCompleteEvent.php 0000644 00000001052 15231072344 0012154 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User reset event. * Example: * new BeforeResetCompleteEvent('onEventName', ['subject' => $user]); * * @since 5.2.0 */ class BeforeResetCompleteEvent extends AbstractResetEvent { } LoginFailureEvent.php 0000644 00000001104 15231072344 0010634 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new LoginFailureEvent('onEventName', ['subject' => $authenticationResponseArray, 'options' => $options]); * * @since 5.0.0 */ class LoginFailureEvent extends AbstractLoginEvent { } LogoutEvent.php 0000644 00000001415 15231072344 0007532 0 ustar 00 <?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\User; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; use Joomla\CMS\Event\Result\ResultTypeBooleanAware; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new LogoutEvent('onEventName', ['subject' => $parameters, 'options' => $options]); * * @since 5.0.0 */ class LogoutEvent extends AbstractLogoutEvent implements ResultAwareInterface { use ResultAware; use ResultTypeBooleanAware; } AfterResetCompleteEvent.php 0000644 00000001050 15231072344 0012011 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User reset event. * Example: * new AfterResetCompleteEvent('onEventName', ['subject' => $user]); * * @since 5.2.0 */ class AfterResetCompleteEvent extends AbstractResetEvent { } BeforeSaveEvent.php 0000644 00000002744 15231072344 0010310 0 ustar 00 <?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\User; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; use Joomla\CMS\Event\Result\ResultTypeBooleanAware; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User save event. * Example: * new BeforeSaveEvent('onEventName', ['subject' => $oldUserArray, 'isNew' => $isNew, 'data' => $data]); * * @since 5.0.0 */ class BeforeSaveEvent extends AbstractSaveEvent implements ResultAwareInterface { use ResultAware; use ResultTypeBooleanAware; /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject', 'isNew', 'data']; /** * Setter for the data argument. * * @param array $value The value to set * * @return array * * @since 5.0.0 */ protected function onSetData(array $value): array { return $value; } /** * Getter for the data. * * @return array * * @since 5.0.0 */ public function getData(): array { return $this->arguments['data'] ?? []; } } BeforeResetRequestEvent.php 0000644 00000001050 15231072344 0012032 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User reset event. * Example: * new BeforeResetRequestEvent('onEventName', ['subject' => $user]); * * @since 5.2.0 */ class BeforeResetRequestEvent extends AbstractResetEvent { } LoginEvent.php 0000644 00000001433 15231072344 0007331 0 ustar 00 <?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\User; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; use Joomla\CMS\Event\Result\ResultTypeBooleanAware; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User event. * Example: * new LoginEvent('onEventName', ['subject' => $authenticationResponseArray, 'options' => $options]); * * @since 5.0.0 */ class LoginEvent extends AbstractLoginEvent implements ResultAwareInterface { use ResultAware; use ResultTypeBooleanAware; } UserGroupBeforeDeleteEvent.php 0000644 00000001767 15231072344 0012474 0 ustar 00 <?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\User; use Joomla\CMS\Event\Model\BeforeDeleteEvent as ModelBeforeDeleteEvent; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for Model event. * Example: * new UserGroupBeforeDeleteEvent('onEventName', ['context' => 'com_example.example', 'subject' => $itemObjectToDelete]); * * @since 5.0.0 */ final class UserGroupBeforeDeleteEvent extends ModelBeforeDeleteEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 * * @TODO: In Joomla 7 the event should use 'context', 'subject' only */ protected $legacyArgumentsOrder = ['data', 'context', 'subject']; } UserGroupAfterDeleteEvent.php 0000644 00000002024 15231072344 0012316 0 ustar 00 <?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\User; use Joomla\CMS\Event\Model\AfterDeleteEvent as ModelAfterDeleteEvent; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for Model event. * Example: * new UserGroupAfterDeleteEvent('onEventName', ['context' => 'com_example.example', 'subject' => $itemObjectToDelete]); * * @since 5.0.0 */ final class UserGroupAfterDeleteEvent extends ModelAfterDeleteEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 * * @TODO: In Joomla 7 the event should use 'context', 'subject' only */ protected $legacyArgumentsOrder = ['data', 'deletingResult', 'errorMessage', 'context', 'subject']; } AfterDeleteEvent.php 0000644 00000004572 15231072344 0010454 0 ustar 00 <?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\User; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Class for User delete event. * Example: * new AfterDeleteEvent('onEventName', ['subject' => $userArray, 'deletingResult' => $result, 'errorMessage' => $errorStr]); * * @since 5.0.0 */ class AfterDeleteEvent extends AbstractDeleteEvent { /** * The argument names, in order expected by legacy plugins. * * @var array * * @since 5.0.0 * @deprecated 5.0 will be removed in 7.0 */ protected $legacyArgumentsOrder = ['subject', 'deletingResult', 'errorMessage']; /** * 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 = []) { parent::__construct($name, $arguments); if (!\array_key_exists('deletingResult', $this->arguments)) { throw new \BadMethodCallException("Argument 'deletingResult' of event {$name} is required but has not been provided"); } } /** * Setter for the deletingResult argument. * * @param bool $value The value to set * * @return bool * * @since 5.0.0 */ protected function onSetDeletingResult(bool $value): bool { return $value; } /** * Setter for the errorMessage argument. * * @param ?string $value The value to set * * @return ?string * * @since 5.0.0 */ protected function onSetErrorMessage(?string $value): ?string { return $value; } /** * Getter for the deleting result. * * @return bool * * @since 5.0.0 */ public function getDeletingResult(): bool { return $this->arguments['deletingResult']; } /** * Getter for the error message. * * @return string * * @since 5.0.0 */ public function getErrorMessage(): string { return $this->arguments['errorMessage'] ?? ''; } } .htaccess 0000555 00000000355 15231072344 0006347 0 ustar 00 <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>