Index.class.php
1.64 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
<?php
/**
* 首页
*
* @name Service_Index
* @version 1.0 (2013-6-5)
* @package Service/News
* @since 1.0
*/
class Facade_Index
{
/**
* 服务
*/
private static $service = null;
/**
*
* @return Service_Index
*/
private static function service ()
{
if (! isset(self::$service))
{
self::$service = new Service_Index();
}
return self::$service;
}
/**
* 获取首页信息
* @param $type
* @return Ambigous <multitype:, Util_Dao_Db_PdoQuery>
*/
public static function getIndex ($type)
{
return self::service()->getIndex($type);
}
/**
* 根据id更新首页信息状态.
* 用于管理员更新一个首页信息的操作.
* @param int $url
* @param int $text
* @param int $res
* @param int $type
* @param int $sort
* @param int $id
* @return boolean
*/
public static function updateIndex ($url, $text, $res, $type, $sort, $id)
{
return self::service()->updateIndex($url, $text, $res, $type, $sort, $id);
}
/**
* 用户提交首页信息
*
* @param int $url
* @param int $text
* @param int $res
* @param int $type
* @param int $sort
* @return boolean
*/
public static function submitIndex ($url, $text, $res, $type, $sort)
{
return self::service()->submitIndex($url, $text, $res, $type, $sort);
}
/**
* 删除首页信息
* @param unknown_type $id
*/
public static function delIndex($id)
{
return self::service()->delIndex($id);
}
}