1 | <?php |
||
16 | class Category |
||
17 | { |
||
18 | /** |
||
19 | * 分组名称. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $name; |
||
24 | |||
25 | /** |
||
26 | * 编号,作用不明. |
||
27 | * |
||
28 | * @var int |
||
29 | */ |
||
30 | protected $index; |
||
31 | |||
32 | /** |
||
33 | * 顺序. |
||
34 | * |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $sort; |
||
38 | |||
39 | public function __construct($name, $index = 0, $sort = 0) |
||
45 | |||
46 | /** |
||
47 | * @param string $name |
||
48 | */ |
||
49 | public function setName($name) |
||
53 | |||
54 | /** |
||
55 | * @param int $index |
||
56 | */ |
||
57 | public function setIndex($index) |
||
61 | |||
62 | /** |
||
63 | * @param mixed $sort |
||
64 | */ |
||
65 | public function setSort($sort) |
||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getName() |
||
77 | |||
78 | /** |
||
79 | * @return int |
||
80 | */ |
||
81 | public function getIndex() |
||
85 | |||
86 | /** |
||
87 | * @return mixed |
||
88 | */ |
||
89 | public function getSort() |
||
93 | |||
94 | /** |
||
95 | * 创建我的好友默认分类. |
||
96 | * |
||
97 | * @return Category |
||
98 | */ |
||
99 | public static function createMyFriendCategory() |
||
103 | } |
||
104 |