Skip to content

Commit ed04bdc

Browse files
authored
Merge pull request #17 from ddedic/message-title
Add support for Message title
2 parents ba9dd51 + 86a7aec commit ed04bdc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/ExpoMessage.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66

77
class ExpoMessage
88
{
9+
/**
10+
* The message title.
11+
*
12+
* @var string
13+
*/
14+
protected $title;
15+
916
/**
1017
* The message body.
1118
*
@@ -71,6 +78,20 @@ public function __construct(string $body = '')
7178
$this->body = $body;
7279
}
7380

81+
/**
82+
* Set the message title.
83+
*
84+
* @param string $value
85+
*
86+
* @return $this
87+
*/
88+
public function title(string $value)
89+
{
90+
$this->title = $value;
91+
92+
return $this;
93+
}
94+
7495
/**
7596
* Set the message body.
7697
*
@@ -185,6 +206,7 @@ public function setJsonData($data)
185206
public function toArray()
186207
{
187208
return [
209+
'title' => $this->title,
188210
'body' => $this->body,
189211
'sound' => $this->sound,
190212
'badge' => $this->badge,

0 commit comments

Comments
 (0)