Snap.class.php
1.95 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
<?php
/**
* Snap信息
*
* @name Facade_Snap
* @version 1.0 (2013-6-5)
* @package Facade/Snap
* @author hbomb
* @since 1.0
*/
class Facade_Snap
{
private static $service = null;
/**
* 返回service对象
*
* @return Service_Snap_Snap
*/
public static function service()
{
if (null === self::$service)
{
self::$service = new Service_Snap();
}
return self::$service;
}
/**
* 获取snap
*
* @param unknown_type $offset
* @param unknown_type $limit
* @param unknown_type $status
* @return Ambigous <multitype:, Util_Dao_Db_PdoQuery>
*/
public static function getSnap ($offset, $limit)
{
return self::service()->getSnap($offset, $limit);
}
/**
* 态获取所有snap个数. 用于前端分页
*
* @param $status
*/
public static function getSnapTotal ()
{
return self::service()->getSnapTotal();
}
/**
* 根据id更新明星状态. 用于管理员更新一个明星的操作.
* @param unknown_type $name
* @param unknown_type $pics
* @param unknown_type $description
* @param unknown_type $state
* @param unknown_type $brand_id
* @param unknown_type $seq
* @param unknown_type $news_ids
* @param unknown_type $id
*/
public static function updateSnap ($pic,$text,$create_time,$id)
{
$status = self::service()->updateSnap($pic, $text, $create_time, $id);
return $status;
}
/**
* 用户提交snap.
* @param unknown_type $pic
* @param unknown_type $text
*/
public static function submitSnap ($pic,$text)
{
$status = self::service()->submitSnap($pic, $text);
return $status;
}
/**
* 删除SNAP
* @param unknown_type $id
*/
public static function delSnap($id)
{
return self::service()->delSnap($id);
}
}