diff options
Diffstat (limited to 'lib/public/Notification/IDeferrableApp.php')
-rw-r--r-- | lib/public/Notification/IDeferrableApp.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/public/Notification/IDeferrableApp.php b/lib/public/Notification/IDeferrableApp.php new file mode 100644 index 00000000000..00c7d691b10 --- /dev/null +++ b/lib/public/Notification/IDeferrableApp.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Notification; + +use OCP\AppFramework\Attribute\Implementable; + +#[Implementable(since: '20.0.0')] +interface IDeferrableApp extends IApp { + /** + * Start deferring notifications until `flush()` is called + * + * @since 20.0.0 + */ + public function defer(): void; + + /** + * Send all deferred notifications that have been stored since `defer()` was called + * + * @since 20.0.0 + */ + public function flush(): void; +} |