1
0

ShareLinkAccessedEvent.php 762 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\Files_Sharing\Event;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\Share\IShare;
  10. class ShareLinkAccessedEvent extends Event {
  11. public function __construct(
  12. private IShare $share,
  13. private string $step = '',
  14. private int $errorCode = 200,
  15. private string $errorMessage = '',
  16. ) {
  17. parent::__construct();
  18. }
  19. public function getShare(): IShare {
  20. return $this->share;
  21. }
  22. public function getStep(): string {
  23. return $this->step;
  24. }
  25. public function getErrorCode(): int {
  26. return $this->errorCode;
  27. }
  28. public function getErrorMessage(): string {
  29. return $this->errorMessage;
  30. }
  31. }