1 | <?php |
||
5 | class PolarMessage |
||
6 | { |
||
7 | /** |
||
8 | * The notification body text. |
||
9 | */ |
||
10 | public $body; |
||
11 | |||
12 | /** |
||
13 | * The status of the notification (info, success, warning, error). |
||
14 | */ |
||
15 | public $status = 'info'; |
||
16 | |||
17 | /** |
||
18 | * Name of the entity or user sending the message. |
||
19 | */ |
||
20 | public $from = 'system'; |
||
21 | |||
22 | /** |
||
23 | * The notification action url. |
||
24 | */ |
||
25 | public $url; |
||
26 | |||
27 | /** |
||
28 | * Extra data. |
||
29 | */ |
||
30 | public $extra = []; |
||
31 | |||
32 | public function __construct( |
||
45 | |||
46 | public function body(string $body) : self |
||
52 | |||
53 | public function status(string $status) : self |
||
59 | |||
60 | public function from(string $from) : self |
||
66 | |||
67 | public function url(string $url) : self |
||
73 | |||
74 | public function extra(array $extra) : self |
||
80 | } |
||
81 |