1 | <?php |
||
8 | class OneSignalButton |
||
9 | { |
||
10 | /** @var string */ |
||
11 | protected $id; |
||
12 | |||
13 | /** @var string */ |
||
14 | protected $text; |
||
15 | |||
16 | /** @var string */ |
||
17 | protected $icon; |
||
18 | |||
19 | /** |
||
20 | * @param string $id |
||
21 | * |
||
22 | * @return static |
||
23 | */ |
||
24 | public static function create($id) |
||
28 | |||
29 | /** |
||
30 | * @param string $id |
||
31 | */ |
||
32 | public function __construct($id) |
||
36 | |||
37 | /** |
||
38 | * Set the message icon. |
||
39 | * |
||
40 | * @param string $value |
||
41 | * |
||
42 | * @return $this |
||
43 | */ |
||
44 | public function icon($value) |
||
50 | |||
51 | /** |
||
52 | * Set the message subject. |
||
53 | * |
||
54 | * @param string $value |
||
55 | * |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function text($value) |
||
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | */ |
||
68 | public function toArray() |
||
76 | } |
||
77 |