YSMWSystemWaveAction.class.php
2.86 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
<?php
require_once dirname(__FILE__).'/common/YSMWBaseAction.class.php';
require_once dirname(__FILE__).'/../facade/YSMFSystemWaveFacade.class.php';
class YSMWSystemWaveAction extends YSMWBaseAction
{
/**
* 操作区的系统wave处理
* @var object
*/
private $mSystemWave;
/**
* 初始化函数
*
*/
public function __construct()
{
$this->mSystemWave = new YSMFSystemWaveFacade();
}
/**
* 同意联系人请求并添加为好友函数
*
* @param array $request
* @return string
*/
public function confirmContactRequest($request)
{
$userID = $this->getUserID();
$result = $this->mSystemWave->confirmContactRequest($userID, $request);
return $result;
}
/**
* 拒绝联系人请求函数
*
* @param array $request
* @return string
*/
public function refuseContactRequest($request)
{
$userID = $this->getUserID();
$result = $this->mSystemWave->refuseContactRequest($userID, $request);
return $result;
}
/**
* 修改联系人信息函数
*
* @param array $request
* @return string
*/
public function modifyContactInfo($request)
{
$userID = $this->getUserID();
$result = $this->mSystemWave->modifyContactInfo($userID, $request);
return $result;
}
/**
* 删除系统消息
*
* @param array $request
* @return string
*/
public function deleteSystemMessage($request)
{
$userID = $this->getUserID();
$result = $this->mSystemWave->deleteSystemMessage($userID, $request);
return $result;
}
/**
* 设置访问规则函数
*
* @return array
*/
public function accessRule()
{
return array(
array(
'allow',
'actions' => array(
'confirmContactRequest',
'refuseContactRequest',
'modifyContactInfo',
'deleteSystemMessage'
),
'users' => array('@'),
),
);
}
/**
* (non-PHPdoc)
* @see YSMWBaseAction::optLoggerRule()
*/
public function optLoggerRule()
{
return array(
'confirmContactRequest' => 'PS000808001',
'refuseContactRequest' => 'PS000808002',
'modifyContactInfo' => 'PS000808003',
'deleteSystemMessage' => 'PS000808004',
);
}
}
?>