ShareMountedEvent.php 855 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 SharedMount */
  13. private $mount;
  14. /** @var IMountPoint[] */
  15. private $additionalMounts = [];
  16. public function __construct(SharedMount $mount) {
  17. parent::__construct();
  18. $this->mount = $mount;
  19. }
  20. public function getMount(): SharedMount {
  21. return $this->mount;
  22. }
  23. public function addAdditionalMount(IMountPoint $mountPoint): void {
  24. $this->additionalMounts[] = $mountPoint;
  25. }
  26. /**
  27. * @return IMountPoint[]
  28. */
  29. public function getAdditionalMounts(): array {
  30. return $this->additionalMounts;
  31. }
  32. }