Manager

class OC\Notification\Manager
Source:lib/private/Notification/Manager.php#42
Implements:OCP\Notification\IManager

Properties

protected static property OC\Notification\Manager::$validator
Source:lib/private/Notification/Manager.php#44
Type:\OCP\RichObjectStrings\IValidator
protected static property OC\Notification\Manager::$logger
Source:lib/private/Notification/Manager.php#46
Type:\OCP\ILogger
protected static property OC\Notification\Manager::$apps
Source:lib/private/Notification/Manager.php#51
Type:\OCP\Notification\IApp[]
protected static property OC\Notification\Manager::$appClasses
Source:lib/private/Notification/Manager.php#53
Type:string[]
protected static property OC\Notification\Manager::$notifiers
Source:lib/private/Notification/Manager.php#56
Type:\OCP\Notification\INotifier[]
protected static property OC\Notification\Manager::$notifierClasses
Source:lib/private/Notification/Manager.php#58
Type:string[]
protected static property OC\Notification\Manager::$preparingPushNotification
Source:lib/private/Notification/Manager.php#61
Type:bool
protected static property OC\Notification\Manager::$deferPushing
Source:lib/private/Notification/Manager.php#63
Type:bool

Methods

public OC\Notification\Manager::__construct($validator, $logger, $coordinator)
Source:lib/private/Notification/Manager.php#67
public OC\Notification\Manager::registerApp($appClass)
Source:

lib/private/Notification/Manager.php#87

Parameters:
  • $appClass (string) The service must implement IApp, otherwise a

InvalidArgumentException is thrown later

Since:

17.0.0

public OC\Notification\Manager::registerNotifier($service, $info)
Source:

lib/private/Notification/Manager.php#99

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

Deprecated:

17.0.0 use registerNotifierService instead.

Since:

8.2.0 - Parameter $info was added in 9.0.0

public OC\Notification\Manager::registerNotifierService($notifierService)
Source:

lib/private/Notification/Manager.php#111

Parameters:
  • $notifierService (string) The service must implement INotifier, otherwise a

InvalidArgumentException is thrown later

Since:

17.0.0

protected OC\Notification\Manager::getApps()
Source:lib/private/Notification/Manager.php#118
Returns:\OCP\Notification\IApp[]
public OC\Notification\Manager::getNotifiers()
Source:lib/private/Notification/Manager.php#152
Returns:\OCP\Notification\INotifier[]
public OC\Notification\Manager::createNotification()
Source:lib/private/Notification/Manager.php#213
Returns:\OCP\Notification\INotification
Since:8.2.0
public OC\Notification\Manager::hasNotifiers()
Source:lib/private/Notification/Manager.php#221
Returns:bool
Since:8.2.0
public OC\Notification\Manager::setPreparingPushNotification($preparingPushNotification)
Source:

lib/private/Notification/Manager.php#229

Parameters:
  • $preparingPushNotification (bool)
Since:

14.0.0

public OC\Notification\Manager::isPreparingPushNotification()
Source:lib/private/Notification/Manager.php#237
Returns:bool
Since:14.0.0
public OC\Notification\Manager::defer()
The calling app should only “flush” when it got returned true on the defer call
Source:lib/private/Notification/Manager.php#246
Returns:bool
Since:20.0.0
public OC\Notification\Manager::flush()
Source:lib/private/Notification/Manager.php#264
Since:20.0.0
public OC\Notification\Manager::notify($notification)
Source:

lib/private/Notification/Manager.php#286

Parameters:
Throws:

\InvalidArgumentException When the notification is not valid

Since:

8.2.0

public OC\Notification\Manager::getID()
Identifier of the notifier, only use [a-z0-9_]
Source:lib/private/Notification/Manager.php#307
Returns:string
Since:17.0.0
public OC\Notification\Manager::getName()
Human readable name describing the notifier
Source:lib/private/Notification/Manager.php#317
Returns:string
Since:17.0.0
public OC\Notification\Manager::prepare($notification, $languageCode)
Source:

lib/private/Notification/Manager.php#329

Parameters:
Returns:

\OCP\Notification\INotification

Throws:

\InvalidArgumentException When the notification was not prepared by a notifier

Throws:

\OCP\Notification\AlreadyProcessedException When the notification is not needed anymore and should be deleted

Throws:

\InvalidArgumentException When the notification was not prepared by a notifier

Throws:

\OCP\Notification\AlreadyProcessedException When the notification is not needed anymore and should be deleted

Since:

8.2.0

public OC\Notification\Manager::markProcessed($notification)
Source:

lib/private/Notification/Manager.php#357

Parameters:
public OC\Notification\Manager::getCount($notification)
Source:

lib/private/Notification/Manager.php#369

Parameters:
Returns:

int

public OC\Notification\Manager::dismissNotification($notification)
Source:lib/private/Notification/Manager.php#380