| 1 | <?php |
||
| 5 | class OneSignalButton |
||
| 6 | { |
||
| 7 | /** @var string */ |
||
| 8 | protected $id; |
||
| 9 | |||
| 10 | /** @var string */ |
||
| 11 | protected $text; |
||
| 12 | |||
| 13 | /** @var string */ |
||
| 14 | protected $icon; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param string $id |
||
| 18 | * |
||
| 19 | * @return static |
||
| 20 | */ |
||
| 21 | 1 | public static function create($id) |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $id |
||
| 28 | */ |
||
| 29 | 1 | public function __construct($id) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Set the message icon. |
||
| 36 | * |
||
| 37 | * @param string $value |
||
| 38 | * |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | 1 | public function icon($value) |
|
| 47 | |||
| 48 | /** |
||
| 49 | * Set the message subject. |
||
| 50 | * |
||
| 51 | * @param string $value |
||
| 52 | * |
||
| 53 | * @return $this |
||
| 54 | */ |
||
| 55 | 1 | public function text($value) |
|
| 61 | |||
| 62 | /** |
||
| 63 | * @return array |
||
| 64 | */ |
||
| 65 | 1 | public function toArray() |
|
| 73 | } |
||
| 74 |