YSMWLogoutAction.class.php
1.3 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
<?php
require_once dirname(__FILE__).'/../facade/YSMFLogoutFacade.class.php';
require_once dirname(__FILE__).'/common/YSMWBaseAction.class.php';
class YSMWLogoutAction extends YSMWBaseAction
{
private $mUserLogoutFacade = null;
/**
* 初始化函数
*/
public function __construct()
{
$this->mUserLogoutFacade = new YSMFLogoutFacade();
}
/**
* 退出函数
*/
public function logout()
{
$userID = $this->getUserID();
$result = $this->mUserLogoutFacade->logout($userID);
return $result;
}
/**
* 设置访问规则函数
*
* @return array
*/
public function accessRule()
{
return array(
array(
'allow',
'actions' => array(
'logout'
),
'users' => array('@'),
),
);
}
/**
* (non-PHPdoc)
* @see YSMWBaseAction::optLoggerRule()
*/
public function optLoggerRule()
{
return array(
'logout' => 'PS000505001',
);
}
}
?>