1 | <?php namespace nyx\notify\traits; |
||
25 | trait Notifiable |
||
26 | { |
||
27 | /** |
||
28 | * @see \nyx\notify\interfaces\Notifiable::notify() |
||
29 | */ |
||
30 | public function notify(interfaces\Notification $notification) |
||
34 | |||
35 | /** |
||
36 | * @see \nyx\notify\interfaces\Notifiable::routeNotification() |
||
37 | * |
||
38 | * Note: This is a catch-all method. You can either override it or provide getNotificationRouteFor* methods |
||
39 | * for each transport supported by the entity. For example, a method returning data for the Slack |
||
40 | * transport would be called: "routeNotificationForSlack()" |
||
41 | * |
||
42 | * For any transport that is not supported, or if you simply want to circumvent notifying an entity |
||
43 | * under certain conditions, return false and/or simply do not implement methods for those transports. |
||
44 | */ |
||
45 | public function routeNotification(string $transport, $message) |
||
53 | } |
||
54 |