1
0

ShareMountedEvent.php 801 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 OCA\Files_Sharing\SharedMount;
  9. use OCP\EventDispatcher\Event;
  10. use OCP\Files\Mount\IMountPoint;
  11. class ShareMountedEvent extends Event {
  12. /** @var IMountPoint[] */
  13. private $additionalMounts = [];
  14. public function __construct(
  15. private SharedMount $mount,
  16. ) {
  17. parent::__construct();
  18. }
  19. public function getMount(): SharedMount {
  20. return $this->mount;
  21. }
  22. public function addAdditionalMount(IMountPoint $mountPoint): void {
  23. $this->additionalMounts[] = $mountPoint;
  24. }
  25. /**
  26. * @return IMountPoint[]
  27. */
  28. public function getAdditionalMounts(): array {
  29. return $this->additionalMounts;
  30. }
  31. }