OwnerLockedException.php 617 B

123456789101112131415161718192021222324252627282930313233343536
  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\Files\Lock;
  8. use OCP\Lock\LockedException;
  9. /**
  10. * @since 24.0.0
  11. */
  12. class OwnerLockedException extends LockedException {
  13. private ILock $lock;
  14. /**
  15. * @since 24.0.0
  16. */
  17. public function __construct(ILock $lock) {
  18. $this->lock = $lock;
  19. $path = '';
  20. $readablePath = '';
  21. parent::__construct($path, null, $lock->getOwner(), $readablePath);
  22. }
  23. /**
  24. * @since 24.0.0
  25. */
  26. public function getLock(): ILock {
  27. return $this->lock;
  28. }
  29. }