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