Partner.class.php
1.57 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
<?php
class Facade_Partner
{
/**
* 服务
*/
private static $service = null;
/**
* 分类类型
*
* @var unknown_type
*/
public static $types = array
(
0 => '特邀合作伙伴',
1 => '特邀合作媒体',
2 => '合作伙伴',
3 => '合作媒体',
);
/**
*
* @return Service_Partner
*/
private static function service ()
{
if (! isset(self::$service))
{
self::$service = new Service_Partner();
}
return self::$service;
}
/**
* 获取所有合作伙伴
*
* @return array
*/
public static function getPartner()
{
return self::service()->getPartner();
}
/**
* 增加合作伙伴
*
* @param int $type
* @param string $name
* @param string $pic
* @param string $url
* @param string $description
* @return int
*/
public static function setPartner($type, $name, $pic, $url, $description)
{
return self::service()->setPartner($type, $name, $pic, $url, $description);
}
/**
* 修改合作伙伴
*
* @param int $id
* @param int $type
* @param string $name
* @param string $pic
* @param string $url
* @param string $description
* @return boolean
*/
public static function setPartnerById($id, $type, $name, $pic, $url, $description)
{
return self::service()->setPartnerById($id, $type, $name, $pic, $url, $description);
}
/**
* 删除合作伙伴
*
* @param string $id
* @return boolean
*/
public static function delPartner($id)
{
return self::service()->delPartner($id);
}
}