2021-02-08 10:02:08 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2021-06-04 15:52:51 -04:00
|
|
|
|
2021-02-08 10:02:08 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-02-08 10:02:08 -05:00
|
|
|
*/
|
|
|
|
|
namespace OCP\Share\Exceptions;
|
|
|
|
|
|
|
|
|
|
use OCP\Share\IShare;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 22.0.0
|
|
|
|
|
*/
|
|
|
|
|
class AlreadySharedException extends GenericShareException {
|
|
|
|
|
/** @var IShare */
|
|
|
|
|
private $existingShare;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 22.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(string $message, IShare $existingShare) {
|
|
|
|
|
parent::__construct($message);
|
|
|
|
|
|
|
|
|
|
$this->existingShare = $existingShare;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 22.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getExistingShare(): IShare {
|
|
|
|
|
return $this->existingShare;
|
|
|
|
|
}
|
|
|
|
|
}
|