IManager
extends
IApp, INotifier
in
Interface IManager
Tags
Table of Contents
Methods
- createNotification() : INotification
- defer() : bool
- Start deferring notifications until `flush()` is called
- dismissNotification() : void
- flush() : void
- Send all deferred notifications that have been stored since `defer()` was called
- getCount() : int
- getID() : string
- Identifier of the notifier, only use [a-z0-9_]
- getName() : string
- Human-readable name describing the notifier
- getNotifiers() : array<string|int, INotifier>
- hasNotifiers() : bool
- isFairUseOfFreePushService() : bool
- Whether the server can use the hosted push notification service
- isPreparingPushNotification() : bool
- markProcessed() : void
- notify() : void
- prepare() : INotification
- registerApp() : void
- registerNotifier() : mixed
- registerNotifierService() : void
- setPreparingPushNotification() : void
Methods
createNotification()
public
createNotification() : INotification
Tags
Return values
INotificationdefer()
Start deferring notifications until `flush()` is called
public
defer() : bool
The calling app should only "flush" when it got returned true on the defer call, otherwise another app is deferring the sending already.
Tags
Return values
booldismissNotification()
public
dismissNotification(INotification $notification) : void
Parameters
- $notification : INotification
Tags
flush()
Send all deferred notifications that have been stored since `defer()` was called
public
flush() : void
Tags
getCount()
public
getCount(INotification $notification) : int
Parameters
- $notification : INotification
Tags
Return values
intgetID()
Identifier of the notifier, only use [a-z0-9_]
public
getID() : string
Tags
Return values
stringgetName()
Human-readable name describing the notifier
public
getName() : string
Tags
Return values
stringgetNotifiers()
public
getNotifiers() : array<string|int, INotifier>
Tags
Return values
array<string|int, INotifier>hasNotifiers()
public
hasNotifiers() : bool
Tags
Return values
boolisFairUseOfFreePushService()
Whether the server can use the hosted push notification service
public
isFairUseOfFreePushService() : bool
We want to keep offering our push notification service for free, but large users overload our infrastructure. For this reason we have to rate-limit the use of push notifications. If you need this feature, consider using Nextcloud Enterprise.
Tags
Return values
boolisPreparingPushNotification()
public
isPreparingPushNotification() : bool
Tags
Return values
boolmarkProcessed()
public
markProcessed(INotification $notification) : void
Parameters
- $notification : INotification
Tags
notify()
public
notify(INotification $notification) : void
Parameters
- $notification : INotification
Tags
prepare()
public
prepare(INotification $notification, string $languageCode) : INotification
Parameters
- $notification : INotification
- $languageCode : string
-
The code of the language that should be used to prepare the notification
Tags
Return values
INotificationregisterApp()
public
registerApp(string $appClass) : void
Parameters
- $appClass : string
-
The service must implement IApp, otherwise a \InvalidArgumentException is thrown later
Tags
registerNotifier()
public
registerNotifier(Closure $service, Closure $info) : mixed
use registerNotifierService instead.
Parameters
- $service : Closure
-
The service must implement INotifier, otherwise a \InvalidArgumentException is thrown later
- $info : Closure
-
An array with the keys 'id' and 'name' containing the app id and the app name
Tags
registerNotifierService()
public
registerNotifierService(string $notifierService) : void
use the IBootStrap registration context
Parameters
- $notifierService : string
-
The service must implement INotifier, otherwise a \InvalidArgumentException is thrown later
Tags
setPreparingPushNotification()
public
setPreparingPushNotification(bool $preparingPushNotification) : void
Parameters
- $preparingPushNotification : bool