diff options
Diffstat (limited to 'lib/public/Notification')
-rw-r--r-- | lib/public/Notification/AlreadyProcessedException.php | 6 | ||||
-rw-r--r-- | lib/public/Notification/IManager.php | 14 |
2 files changed, 18 insertions, 2 deletions
diff --git a/lib/public/Notification/AlreadyProcessedException.php b/lib/public/Notification/AlreadyProcessedException.php index 3cfe4667d6b..0ccac25f0fb 100644 --- a/lib/public/Notification/AlreadyProcessedException.php +++ b/lib/public/Notification/AlreadyProcessedException.php @@ -23,8 +23,14 @@ declare(strict_types=1); namespace OCP\Notification; +/** + * @since 17.0.0 + */ class AlreadyProcessedException extends \RuntimeException { + /** + * @since 17.0.0 + */ public function __construct() { parent::__construct('Notification is processed already'); } diff --git a/lib/public/Notification/IManager.php b/lib/public/Notification/IManager.php index 262bb121431..af890594d4c 100644 --- a/lib/public/Notification/IManager.php +++ b/lib/public/Notification/IManager.php @@ -38,11 +38,21 @@ interface IManager extends IApp, INotifier { public function registerApp(string $appClass): void; /** - * @param string $notifierClass The service must implement INotifier, otherwise a + * @param \Closure $service The service must implement INotifier, otherwise a + * \InvalidArgumentException is thrown later + * @param \Closure $info An array with the keys 'id' and 'name' containing + * the app id and the app name + * @deprecated 17.0.0 use registerNotifierService instead. + * @since 8.2.0 - Parameter $info was added in 9.0.0 + */ + public function registerNotifier(\Closure $service, \Closure $info); + + /** + * @param string $notifierService The service must implement INotifier, otherwise a * \InvalidArgumentException is thrown later * @since 17.0.0 */ - public function registerNotifier(string $notifierClass): void; + public function registerNotifierService(string $notifierService): void; /** * @return INotifier[] |