More documentation
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2023-09-19 06:34:20 +00:00
parent f5a34213b5
commit 876702473c
4 changed files with 49 additions and 25 deletions

View File

@@ -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) {