BeforePreferenceDeletedEvent.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Config;
  8. use OCP\EventDispatcher\Event;
  9. /**
  10. * @since 25.0.0
  11. */
  12. class BeforePreferenceDeletedEvent extends Event {
  13. protected string $userId;
  14. protected string $appId;
  15. protected string $configKey;
  16. protected bool $valid = false;
  17. /**
  18. * @since 25.0.0
  19. */
  20. public function __construct(string $userId, string $appId, string $configKey) {
  21. parent::__construct();
  22. $this->userId = $userId;
  23. $this->appId = $appId;
  24. $this->configKey = $configKey;
  25. }
  26. /**
  27. * @since 25.0.0
  28. */
  29. public function getUserId(): string {
  30. return $this->userId;
  31. }
  32. /**
  33. * @since 25.0.0
  34. */
  35. public function getAppId(): string {
  36. return $this->appId;
  37. }
  38. /**
  39. * @since 25.0.0
  40. */
  41. public function getConfigKey(): string {
  42. return $this->configKey;
  43. }
  44. /**
  45. * @since 25.0.0
  46. */
  47. public function isValid(): bool {
  48. return $this->valid;
  49. }
  50. /**
  51. * @since 25.0.0
  52. */
  53. public function setValid(bool $valid): void {
  54. $this->valid = $valid;
  55. }
  56. }