diff options
author | Joas Schilling <coding@schilljs.com> | 2019-07-16 11:36:32 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-07-16 11:36:32 +0200 |
commit | 55f5bc79a148f065cffa8c97e1867c5814047ff0 (patch) | |
tree | f7873ae6cce3d3fa96ea620854e36f2470c25e3a /lib/public/Notification | |
parent | 6d71e471e166c30c0b9abe05d36240b9f1556d8e (diff) | |
download | nextcloud-server-55f5bc79a148f065cffa8c97e1867c5814047ff0.tar.gz nextcloud-server-55f5bc79a148f065cffa8c97e1867c5814047ff0.zip |
Keep the old method as a fallback and adjust the tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
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[] |