TokenForAlicom.php
2.5 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
/**
* 用于接收云通信消息的临时token
*
* @property string messageType
* @property string token
* @property int expireTime
* @property string tempAccessKey
* @property string tempSecret
* @property \AliyunMNS\Client client
* @property string queue
*/
class TokenForAlicom
{
/**
* 设置消息类型
* @param string $messageType
*/
public function setMessageType($messageType)
{
$this->messageType = $messageType;
}
/**
* 取得消息类型
* @return string
*/
public function getMessageType()
{
return $this->messageType;
}
/**
* 设置临时token
* @param string $token
*/
public function setToken($token)
{
$this->token = $token;
}
/**
* 取得临时token
* @return string
*/
public function getToken()
{
return $this->token;
}
/**
* 设置过期时间 (unix timestamp)
* @param int $expireTime
*/
public function setExpireTime($expireTime)
{
$this->expireTime = $expireTime;
}
/**
* 取得过期时间 (unix timestamp)
* @return int
* @return int
*/
public function getExpireTime()
{
return $this->expireTime;
}
/**
* 设置临时AccessKeyId
* @param $tempAccessKey
*/
public function setTempAccessKey($tempAccessKey)
{
$this->tempAccessKey = $tempAccessKey;
}
/**
* 取得临时AccessKeyId
* @return string
*/
public function getTempAccessKey()
{
return $this->tempAccessKey;
}
/**
* 设置临时AccessKeySecret
* @param string $tempSecret
*/
public function setTempSecret($tempSecret)
{
$this->tempSecret = $tempSecret;
}
/**
* 取得临时AccessKeySecret
* @return string
*/
public function getTempSecret()
{
return $this->tempSecret;
}
/**
* 设置MNS Client
* @param \AliyunMNS\Client $client
*/
public function setClient($client)
{
$this->client = $client;
}
/**
* 取得MNS Client
* @return \AliyunMNS\Client
*/
public function getClient()
{
return $this->client;
}
/**
* 设置Queue Name
* @param string $queue
*/
public function setQueue($queue)
{
$this->queue = $queue;
}
/**
* 取得Queue Name
* @return string
*/
public function getQueue()
{
return $this->queue;
}
}