Mobile.class.php
865 Bytes
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
<?php
/**
* 品牌信息
*
* @name Service_Mobile
* @version 1.0 (2013-6-5)
* @package Service/Mobile
* @author whb
* @since 1.0
*/
class Service_Mobile extends Lib_Service
{
const ROUTER = 'mobile.yohood.mobile';
private static $_tag = 'tag_yohood_mobile_';
private static $_key = 'key_yohood_mobile_';
/**
* 获取模块
*
* @return array
*/
public function getModule()
{
return self::service(self::ROUTER)->tag(self::$_tag)->fetchAssoc('getModule');
}
/**
* 设置模块状态
*
* @param int $id
* @param int $status
* @return boolan
*/
public function setModuleStatus($id, $status)
{
$status = self::service(self::ROUTER)->cache(false)->update('setModuleStatus', array('status' => $status, 'id'=> $id))->status();
if($status)
{
self::service(self::ROUTER)->delTags(self::$_tag);
}
return $status;
}
}