1
0

IApp.php 910 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  6. * SPDX-License-Identifier: AGPL-3.0-only
  7. */
  8. namespace OCP\Notification;
  9. /**
  10. * Interface IApp
  11. *
  12. * @since 9.0.0
  13. */
  14. interface IApp {
  15. /**
  16. * @param INotification $notification
  17. * @throws IncompleteNotificationException When the notification does not have all required fields set
  18. * @since 9.0.0
  19. * @since 30.0.0 throws {@see IncompleteNotificationException} instead of \InvalidArgumentException
  20. */
  21. public function notify(INotification $notification): void;
  22. /**
  23. * @param INotification $notification
  24. * @since 9.0.0
  25. */
  26. public function markProcessed(INotification $notification): void;
  27. /**
  28. * @param INotification $notification
  29. * @return int
  30. * @since 9.0.0
  31. */
  32. public function getCount(INotification $notification): int;
  33. }