1: <?php
2: 3: 4: 5: 6:
7:
8: if(!defined('XOOPS_ROOT_PATH'))
9: {
10: exit;
11: }
12:
13: 14: 15:
16: abstract class Legacy_AbstractGroupObject extends XoopsSimpleObject
17: {
18: const PRIMARY = 'group_id';
19: const DATANAME = 'group';
20:
21: 22: 23: 24: 25: 26: 27:
28: public function __construct()
29: {
30: $this->initVar('group_id', XOBJ_DTYPE_INT, '', false);
31: $this->initVar('title', XOBJ_DTYPE_STRING, '', false, 255);
32: $this->initVar('description', XOBJ_DTYPE_TEXT, '', false);
33: $this->initVar('posttime', XOBJ_DTYPE_INT, time(), false);
34: }
35:
36: 37: 38: 39: 40: 41: 42:
43: public function getPrimary()
44: {
45: return self::PRIMARY;
46: }
47:
48: 49: 50: 51: 52: 53: 54:
55: public function getDataname()
56: {
57: return self::DATANAME;
58: }
59:
60: 61: 62: 63: 64: 65: 66: 67:
68: abstract public function isMember( $uid, $rank=Lenum_GroupRank::REGULAR);
69:
70: 71: 72: 73: 74: 75: 76:
77: abstract public function countMembers( $rank=Lenum_GroupRank::ASSOCIATE);
78:
79: 80: 81: 82: 83: 84: 85:
86: public function renderUri($action=null)
87: {
88: return Legacy_Utils::renderUri($this->getDirname(), $this->getDataname(), $this->get($this->getPrimary()), $action);
89: }
90: }
91:
92: ?>
93: