1: <?php
2: /**
3: * XOOPS Kernel Class
4: *
5: * You may not change or alter any portion of this comment or credits
6: * of supporting developers from this source code or any supporting source code
7: * which is considered copyrighted (c) material of the original comment or credit authors.
8: * This program is distributed in the hope that it will be useful,
9: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11: *
12: * @copyright XOOPS Project (http://xoops.org)
13: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
14: * @package kernel
15: * @since 2.6.0
16: * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/
17: * @version $Id$
18: */
19:
20: namespace Xoops\Core\Kernel\Handlers;
21:
22: use Xoops\Core\Kernel\Dtype;
23: use Xoops\Core\Kernel\XoopsObject;
24:
25: /**
26: * membership of a user in a group
27: *
28: * @category Xoops\Core\Kernel\Handlers\XoopsMembership
29: * @package Xoops\Core\Kernel
30: * @author Kazumi Ono <onokazu@xoops.org>
31: * @copyright 2000-2015 XOOPS Project (http://xoops.org)
32: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
33: * @link http://xoops.org
34: */
35: class XoopsMembership extends XoopsObject
36: {
37: /**
38: * Constructor
39: */
40: public function __construct()
41: {
42: $this->initVar('linkid', Dtype::TYPE_INTEGER, null, false);
43: $this->initVar('groupid', Dtype::TYPE_INTEGER, null, false);
44: $this->initVar('uid', Dtype::TYPE_INTEGER, null, false);
45: }
46:
47: /**
48: * getter for id generic key
49: *
50: * @param string $format Dtype::FORMAT_xxxx constant
51: *
52: * @return mixed
53: */
54: public function id($format = Dtype::FORMAT_NONE)
55: {
56: return $this->linkid($format);
57: }
58:
59: /**
60: * getter for linkid field
61: *
62: * @param string $format Dtype::FORMAT_xxxx constant
63: *
64: * @return mixed
65: */
66: public function linkid($format = '')
67: {
68: return $this->getVar('linkid', $format);
69: }
70:
71: /**
72: * getter for uid field
73: *
74: * @param string $format Dtype::FORMAT_xxxx constant
75: *
76: * @return mixed
77: */
78: public function uid($format = '')
79: {
80: return $this->getVar('uid', $format);
81: }
82: }
83: