1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* (c) Alexander Zhukov <[email protected]> |
5
|
|
|
* |
6
|
|
|
* For the full copyright and license information, please view the LICENSE |
7
|
|
|
* file that was distributed with this source code. |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
namespace Zbox\UnifiedPush\Message\Type; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Class MPNSTile |
14
|
|
|
* @package Zbox\UnifiedPush\Message\Type |
15
|
|
|
*/ |
16
|
|
|
class MPNSTile extends MPNSBase |
17
|
|
|
{ |
18
|
|
|
const MESSAGE_TYPE = 'tile'; |
19
|
|
|
|
20
|
|
|
const DELAY_INTERVAL_IMMEDIATE = 1; |
21
|
|
|
const DELAY_INTERVAL_450 = 11; |
22
|
|
|
const DELAY_INTERVAL_900 = 21; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
private $title; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var string |
31
|
|
|
*/ |
32
|
|
|
private $backgroundImage; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var int |
36
|
|
|
*/ |
37
|
|
|
private $count; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var string |
41
|
|
|
*/ |
42
|
|
|
private $backTitle; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @var string |
46
|
|
|
*/ |
47
|
|
|
private $backBackgroundImage; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @var string |
51
|
|
|
*/ |
52
|
|
|
private $backContent; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @return string |
56
|
|
|
*/ |
57
|
|
|
public function getBackBackgroundImage() |
58
|
|
|
{ |
59
|
|
|
return $this->backBackgroundImage; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @param string $backBackgroundImage |
64
|
|
|
* @return $this |
65
|
|
|
*/ |
66
|
|
|
public function setBackBackgroundImage($backBackgroundImage) |
67
|
|
|
{ |
68
|
|
|
$this->backBackgroundImage = $backBackgroundImage; |
69
|
|
|
return $this; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @return string |
74
|
|
|
*/ |
75
|
|
|
public function getBackContent() |
76
|
|
|
{ |
77
|
|
|
return $this->backContent; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @param string $backContent |
82
|
|
|
* @return $this |
83
|
|
|
*/ |
84
|
|
|
public function setBackContent($backContent) |
85
|
|
|
{ |
86
|
|
|
$this->backContent = $backContent; |
87
|
|
|
return $this; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @return string |
92
|
|
|
*/ |
93
|
|
|
public function getBackTitle() |
94
|
|
|
{ |
95
|
|
|
return $this->backTitle; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @param string $backTitle |
100
|
|
|
* @return $this |
101
|
|
|
*/ |
102
|
|
|
public function setBackTitle($backTitle) |
103
|
|
|
{ |
104
|
|
|
$this->backTitle = $backTitle; |
105
|
|
|
return $this; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @return string |
110
|
|
|
*/ |
111
|
|
|
public function getBackgroundImage() |
112
|
|
|
{ |
113
|
|
|
return $this->backgroundImage; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @param string $backgroundImage |
118
|
|
|
* @return $this |
119
|
|
|
*/ |
120
|
|
|
public function setBackgroundImage($backgroundImage) |
121
|
|
|
{ |
122
|
|
|
$this->backgroundImage = $backgroundImage; |
123
|
|
|
return $this; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @return int |
128
|
|
|
*/ |
129
|
|
|
public function getCount() |
130
|
|
|
{ |
131
|
|
|
return $this->count; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @param int $count |
136
|
|
|
* @return $this |
137
|
|
|
*/ |
138
|
|
|
public function setCount($count) |
139
|
|
|
{ |
140
|
|
|
$this->count = $count; |
141
|
|
|
return $this; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* @return string |
146
|
|
|
*/ |
147
|
|
|
public function getTitle() |
148
|
|
|
{ |
149
|
|
|
return $this->title; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
/** |
153
|
|
|
* @param string $title |
154
|
|
|
* @return $this |
155
|
|
|
*/ |
156
|
|
|
public function setTitle($title) |
157
|
|
|
{ |
158
|
|
|
$this->title = $title; |
159
|
|
|
return $this; |
160
|
|
|
} |
161
|
|
|
} |
162
|
|
|
|