2021-09-08 20:04:37 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
/**
|
2024-06-06 19:48:28 +02:00
|
|
|
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-09-08 20:04:37 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OCA\Files_Sharing\Event;
|
|
|
|
|
|
|
|
use OCP\EventDispatcher\Event;
|
|
|
|
use OCP\Share\IShare;
|
|
|
|
|
|
|
|
class ShareLinkAccessedEvent extends Event {
|
2024-10-18 12:04:22 +02:00
|
|
|
public function __construct(
|
|
|
|
private IShare $share,
|
|
|
|
private string $step = '',
|
|
|
|
private int $errorCode = 200,
|
|
|
|
private string $errorMessage = '',
|
|
|
|
) {
|
2021-09-08 20:04:37 +02:00
|
|
|
parent::__construct();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getShare(): IShare {
|
|
|
|
return $this->share;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getStep(): string {
|
|
|
|
return $this->step;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getErrorCode(): int {
|
|
|
|
return $this->errorCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getErrorMessage(): string {
|
|
|
|
return $this->errorMessage;
|
|
|
|
}
|
|
|
|
}
|