GTSettings.php
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
require_once(dirname(__FILE__) . '/' . 'GTStrategy.php');
class GTSettings extends GTApiRequest
{
/**
* 消息离线时间设置,单位毫秒,-1表示不设离线, -1 ~ 3 * 24 * 3600 * 1000之间
*/
private $ttl;
/**
* 厂商通道策略
*/
private $strategy;
/**
* 推送速度
*/
private $speed;
/**
* 定时推送时间,格式:毫秒时间戳
*/
private $scheduleTime;
public function getTtl()
{
return $this->ttl;
}
public function setTtl($ttl)
{
$this->ttl = $ttl;
$this->apiParam["ttl"] = $ttl;
}
public function getStrategy()
{
return $this->strategy;
}
public function setStrategy($strategy)
{
$this->strategy = $strategy;
}
public function getSpeed()
{
return $this->speed;
}
public function setSpeed($speed)
{
$this->speed = $speed;
$this->apiParam["speed"] = $speed;
}
public function getScheduleTime()
{
return $this->scheduleTime;
}
public function setScheduleTime($scheduleTime)
{
$this->scheduleTime = $scheduleTime;
$this->apiParam["schedule_time"] = $scheduleTime;
}
public function getApiParam()
{
if ($this->strategy != null){
$this->apiParam["strategy"] = $this->strategy->getApiParam();
}
return $this->apiParam;
}
}