|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +/** |
| 6 | + * @copyright Copyright (c) 2023 Murena SAS <akhil.potukuchi.ext@murena.com> |
| 7 | + * |
| 8 | + * @author Murena SAS <akhil.potukuchi.ext@murena.com> |
| 9 | + * |
| 10 | + * @license GNU AGPL version 3 or any later version |
| 11 | + * |
| 12 | + * This program is free software: you can redistribute it and/or modify |
| 13 | + * it under the terms of the GNU Affero General Public License as |
| 14 | + * published by the Free Software Foundation, either version 3 of the |
| 15 | + * License, or (at your option) any later version. |
| 16 | + * |
| 17 | + * This program is distributed in the hope that it will be useful, |
| 18 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | + * GNU Affero General Public License for more details. |
| 21 | + * |
| 22 | + * You should have received a copy of the GNU Affero General Public License |
| 23 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 24 | + * |
| 25 | + */ |
| 26 | + |
| 27 | +namespace OCP\User\Events; |
| 28 | + |
| 29 | +use OCP\EventDispatcher\Event; |
| 30 | + |
| 31 | +/** |
| 32 | + * @since 31.0.0 |
| 33 | + */ |
| 34 | + |
| 35 | +class UserConfigChangedEvent extends Event { |
| 36 | + private string $userId; |
| 37 | + private string $appId; |
| 38 | + private string $key; |
| 39 | + private mixed $value; |
| 40 | + private mixed $oldValue; |
| 41 | + |
| 42 | + /** |
| 43 | + * @since 31.0.0 |
| 44 | + */ |
| 45 | + |
| 46 | + public function __construct(string $userId, |
| 47 | + string $appId, |
| 48 | + string $key, |
| 49 | + mixed $value, |
| 50 | + mixed $oldValue = null) { |
| 51 | + parent::__construct(); |
| 52 | + $this->userId = $userId; |
| 53 | + $this->appId = $appId; |
| 54 | + $this->key = $key; |
| 55 | + $this->value = $value; |
| 56 | + $this->oldValue = $oldValue; |
| 57 | + } |
| 58 | + |
| 59 | + /** |
| 60 | + * @return string |
| 61 | + * @since 31.0.0 |
| 62 | + */ |
| 63 | + public function getUserId(): string { |
| 64 | + return $this->userId; |
| 65 | + } |
| 66 | + |
| 67 | + /** |
| 68 | + * @return string |
| 69 | + * @since 31.0.0 |
| 70 | + */ |
| 71 | + public function getAppId(): string { |
| 72 | + return $this->appId; |
| 73 | + } |
| 74 | + |
| 75 | + /** |
| 76 | + * @return string |
| 77 | + * @since 31.0.0 |
| 78 | + */ |
| 79 | + public function getKey(): string { |
| 80 | + return $this->key; |
| 81 | + } |
| 82 | + |
| 83 | + /** |
| 84 | + * @return mixed |
| 85 | + * @since 31.0.0 |
| 86 | + */ |
| 87 | + public function getValue() { |
| 88 | + return $this->value; |
| 89 | + } |
| 90 | + |
| 91 | + /** |
| 92 | + * @return mixed |
| 93 | + * @since 31.0.0 |
| 94 | + */ |
| 95 | + public function getOldValue() { |
| 96 | + return $this->oldValue; |
| 97 | + } |
| 98 | +} |
0 commit comments