GTPushBatchRequest.php
957 字节
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
<?php
require_once(dirname(__FILE__) . '/' . 'GTPushRequest.php');
class GTPushBatchRequest extends GTApiRequest {
private $isAsync;
private $msgList = array();
public function getIsAsync()
{
return $this->isAsync;
}
public function setIsAsync($isAsync)
{
$this->isAsync = $isAsync;
$this->apiParam["is_async"] = $isAsync;
}
public function getMsgList()
{
return $this->msgList;
}
public function addMsgList($msg)
{
array_push($this->msgList, $msg);
}
public function setMsgList($msg)
{
$this->msgList = $msg;
}
public function getApiParam()
{
if (!empty($this->msgList)){
$this->apiParam["msg_list"] = array();
foreach ($this->msgList as $value) {
array_push($this->apiParam["msg_list"], $value->getApiParam());
}
}
return $this->apiParam;
}
}