Skip to content

Commit 5690f48

Browse files
authored
Add title and subtitle for iOS
Documentation for /createMessage allows for use of 'ios_title' and 'ios_subtitle'. Added this to the IOS model. See: http://docs.pushwoosh.com/docs/createmessage
1 parent 89d609e commit 5690f48

File tree

1 file changed

+28
-1
lines changed
  • src/main/php/Gomoob/Pushwoosh/Model/Notification

1 file changed

+28
-1
lines changed

src/main/php/Gomoob/Pushwoosh/Model/Notification/IOS.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class IOS implements \JsonSerializable
3535
private $sound;
3636
private $ttl;
3737
private $trimContent;
38+
private $title;
39+
private $subtitle;
3840

3941
/**
4042
* Utility function used to create a new IOS instance.
@@ -91,7 +93,16 @@ public function isApnsTrimContent()
9193
public function isTrimContent()
9294
{
9395
return $this->trimContent;
94-
96+
}
97+
98+
public function getTitle()
99+
{
100+
return $this->title;
101+
}
102+
103+
public function getSubtitle()
104+
{
105+
return $this->subtitle;
95106
}
96107

97108
/**
@@ -108,6 +119,8 @@ public function jsonSerialize()
108119
isset($this->sound) ? $json['ios_sound'] = $this->sound : false;
109120
isset($this->ttl) ? $json['ios_ttl'] = $this->ttl : false;
110121
isset($this->trimContent) ? $json['ios_trim_content'] = intval($this->trimContent) : false;
122+
isset($this->title) ? $json['ios_title'] = $this->title : false;
123+
isset($this->subtitle) ? $json['ios_subtitle'] = $this->subtitle : false;
111124

112125
return $json;
113126

@@ -179,4 +192,18 @@ public function setTrimContent($trimContent)
179192

180193
return $this;
181194
}
195+
196+
public function setTitle($title)
197+
{
198+
$this->title = $title;
199+
200+
return $this;
201+
}
202+
203+
public function setSubtitle($subtitle)
204+
{
205+
$this->subtitle = $subtitle;
206+
207+
return $this;
208+
}
182209
}

0 commit comments

Comments
 (0)