IManager
extends
IApp, INotifier
in
Interface IManager
Tags
Table of Contents
- 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() : \OCP\Notification\INotifier[]
- hasNotifiers() : bool
- isPreparingPushNotification() : bool
- markProcessed() : void
- notify() : void
- prepare() : INotification
- registerApp() : void
- registerNotifier() : mixed
- registerNotifierService() : void
- setPreparingPushNotification() : void
Methods
createNotification()
public
createNotification() : INotification
Tags
Return values
INotification —defer()
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
bool —dismissNotification()
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
int —getID()
Identifier of the notifier, only use [a-z0-9_]
public
getID() : string
Tags
Return values
string —getName()
Human readable name describing the notifier
public
getName() : string
Tags
Return values
string —getNotifiers()
public
getNotifiers() : \OCP\Notification\INotifier[]
Tags
Return values
\OCP\Notification\INotifier[] —hasNotifiers()
public
hasNotifiers() : bool
Tags
Return values
bool —isPreparingPushNotification()
public
isPreparingPushNotification() : bool
Tags
Return values
bool —markProcessed()
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
INotification —registerApp()
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
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
Return values
mixed —registerNotifierService()
public
registerNotifierService(string $notifierService) : void
Parameters
- $notifierService : string
-
The service must implement INotifier, otherwise a \InvalidArgumentException is thrown later
Tags
setPreparingPushNotification()
public
setPreparingPushNotification(bool $preparingPushNotification) : void
Parameters
- $preparingPushNotification : bool