Allow checking whether there are notifiers registered

This commit is contained in:
Joas Schilling 2015-09-16 14:48:07 +02:00 committed by Thomas Müller
parent c9397dffea
commit c3420fface
2 changed files with 14 additions and 0 deletions

View File

@ -53,4 +53,10 @@ interface IManager extends IApp, INotifier {
* @since 8.2.0
*/
public function createNotification();
/**
* @return bool
* @since 8.2.0
*/
public function hasNotifiers();
}

View File

@ -112,6 +112,14 @@ class Manager implements IManager {
return new Notification();
}
/**
* @return bool
* @since 8.2.0
*/
public function hasNotifiers() {
return !empty($this->notifiersClosures);
}
/**
* @param INotification $notification
* @return null