libresign/lib/Events/SignedEvent.php
Vitor Mattos 2025df8caa
chore: simplify removing unecessary method
When an object is changed, all changed properties are stored and we can
found what's changed.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
2025-08-01 16:01:06 -03:00

48 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Libresign\Events;
use OCA\Libresign\Db\File as FileEntity;
use OCA\Libresign\Db\SignRequest;
use OCA\Libresign\Service\IdentifyMethod\IIdentifyMethod;
use OCP\EventDispatcher\Event;
use OCP\Files\File;
use OCP\IUser;
class SignedEvent extends Event {
public const FILE_SIGNED = 'libresign_file_signed';
public function __construct(
private SignRequest $signRequest,
private FileEntity $libreSignFile,
private IIdentifyMethod $identifyMethod,
private IUser $user,
private File $signedFile,
) {
}
public function getLibreSignFile(): FileEntity {
return $this->libreSignFile;
}
public function getSignRequest(): SignRequest {
return $this->signRequest;
}
public function getIdentifyMethod(): IIdentifyMethod {
return $this->identifyMethod;
}
public function getUser(): IUser {
return $this->user;
}
public function getSignedFile(): File {
return $this->signedFile;
}
}