This commit is contained in:
@@ -50,6 +50,9 @@ class Notification
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a single notifier instance.
|
||||
*/
|
||||
public function addNotifier(NotificationInterface $instance): void
|
||||
{
|
||||
$this->notifiers[] = $instance;
|
||||
@@ -65,6 +68,11 @@ class Notification
|
||||
return $this->notifiers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Push a notification to all notifiers.
|
||||
*
|
||||
* Logs an error if sending fails.
|
||||
*/
|
||||
public function send(string $title, string $message): void
|
||||
{
|
||||
foreach ($this->getNotifiers() as $notifier) {
|
||||
|
||||
Reference in New Issue
Block a user