Nextcloud PHP API (stable19)

IManager extends IApp, INotifier

Interface IManager

Tags
since
9.0.0

Table of Contents

createNotification()  : INotification
dismissNotification()  : void
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

getID()

Identifier of the notifier, only use [a-z0-9_]

public getID() : string
Tags
since
17.0.0
Return values
string

getName()

Human readable name describing the notifier

public getName() : string
Tags
since
17.0.0
Return values
string

getNotifiers()

public getNotifiers() : \OCP\Notification\INotifier[]
Tags
since
9.0.0
Return values
\OCP\Notification\INotifier[]

hasNotifiers()

public hasNotifiers() : bool
Tags
since
9.0.0
Return values
bool

isPreparingPushNotification()

public isPreparingPushNotification() : bool
Tags
since
14.0.0
Return values
bool

notify()

public notify(INotification $notification) : void
Parameters
$notification : INotification
Tags
throws
InvalidArgumentException

When the notification is not valid

since
9.0.0

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
throws
InvalidArgumentException

When the notification was not prepared by a notifier

throws
AlreadyProcessedException

When the notification is not needed anymore and should be deleted

since
9.0.0
Return values
INotification

registerApp()

public registerApp(string $appClass) : void
Parameters
$appClass : string

The service must implement IApp, otherwise a \InvalidArgumentException is thrown later

Tags
since
17.0.0

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
deprecated
17.0.0

use registerNotifierService instead.

since
8.2.0
  • Parameter $info was added in 9.0.0
Return values
mixed

registerNotifierService()

public registerNotifierService(string $notifierService) : void
Parameters
$notifierService : string

The service must implement INotifier, otherwise a \InvalidArgumentException is thrown later

Tags
since
17.0.0

setPreparingPushNotification()

public setPreparingPushNotification(bool $preparingPushNotification) : void
Parameters
$preparingPushNotification : bool
Tags
since
14.0.0

Search results