| 1 | <?php |
||
| 8 | class OneSignalWebButton |
||
| 9 | { |
||
| 10 | /** @var string */ |
||
| 11 | protected $id; |
||
| 12 | |||
| 13 | /** @var string */ |
||
| 14 | protected $text; |
||
| 15 | |||
| 16 | /** @var string */ |
||
| 17 | protected $icon; |
||
| 18 | |||
| 19 | /** @var string */ |
||
| 20 | protected $url; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $id |
||
| 24 | * |
||
| 25 | * @return static |
||
| 26 | */ |
||
| 27 | public static function create($id) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $id |
||
| 34 | */ |
||
| 35 | public function __construct($id) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Set the message icon. |
||
| 42 | * |
||
| 43 | * @param string $value |
||
| 44 | * |
||
| 45 | * @return $this |
||
| 46 | */ |
||
| 47 | public function icon($value) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Set the message subject. |
||
| 56 | * |
||
| 57 | * @param string $value |
||
| 58 | * |
||
| 59 | * @return $this |
||
| 60 | */ |
||
| 61 | public function text($value) |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Set the message url. |
||
| 70 | * |
||
| 71 | * @param string $value |
||
| 72 | * |
||
| 73 | * @return $this |
||
| 74 | */ |
||
| 75 | public function url($value) |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return array |
||
| 84 | */ |
||
| 85 | public function toArray() |
||
| 94 | } |
||
| 95 |