0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-14 12:59:20 +00:00
nextcloud_server/lib/public/Notification/IDismissableNotifier.php
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +02:00

31 lines
1 KiB
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Notification;
/**
* Interface INotifier classes should implement if they want to process notifications
* that are dismissed by the user.
*
* This can be useful if dismissing the notification will leave it in an incomplete
* state. The handler can choose to for example do some default action.
*
* @since 18.0.0
*/
interface IDismissableNotifier extends INotifier {
/**
* @param INotification $notification
* @throws UnknownNotificationException when the notifier is not in charge of the notification
*
* @since 18.0.0
* @since 30.0.0 Notifiers should throw {@see UnknownNotificationException} instead of \InvalidArgumentException
* when they did not handle the notification. Throwing \InvalidArgumentException directly is deprecated and will
* be logged as an error in Nextcloud 39.
*/
public function dismissNotification(INotification $notification): void;
}