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.0.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: * Online object
27: *
28: * @category Xoops\Core\Kernel\Handlers\XoopsOnline
29: * @package Xoops\Core\Kernel
30: * @author trabis <lusopoemas@gmail.com>
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 XoopsOnline extends XoopsObject
36: {
37: /**
38: * Constructor
39: */
40: public function __construct()
41: {
42: $this->initVar('online_uid', Dtype::TYPE_INTEGER, null, false);
43: $this->initVar('online_uname', Dtype::TYPE_TEXT_BOX, null, true);
44: $this->initVar('online_updated', Dtype::TYPE_INTEGER, null, true);
45: $this->initVar('online_module', Dtype::TYPE_INTEGER, null, true);
46: $this->initVar('online_ip', Dtype::TYPE_TEXT_BOX, null, true);
47: }
48:
49: /**
50: * getter
51: *
52: * @param string $format Dtype::FORMAT_xxxx constant
53: *
54: * @return mixed
55: */
56: public function id($format = Dtype::FORMAT_NONE)
57: {
58: return $this->online_uid($format);
59: }
60:
61: /**
62: * getter
63: *
64: * @param string $format Dtype::FORMAT_xxxx constant
65: *
66: * @return mixed
67: */
68: public function online_uid($format = Dtype::FORMAT_NONE)
69: {
70: return $this->getVar('online_uid', $format);
71: }
72:
73: /**
74: * getter
75: *
76: * @param string $format Dtype::FORMAT_xxxx constant
77: *
78: * @return mixed
79: */
80: public function online_uname($format = '')
81: {
82: return $this->getVar('online_uname', $format);
83: }
84:
85: /**
86: * getter
87: *
88: * @param string $format Dtype::FORMAT_xxxx constant
89: *
90: * @return mixed
91: */
92: public function online_updated($format = '')
93: {
94: return $this->getVar('online_updated', $format);
95: }
96:
97: /**
98: * getter
99: *
100: * @param string $format Dtype::FORMAT_xxxx constant
101: *
102: * @return mixed
103: */
104: public function online_module($format = '')
105: {
106: return $this->getVar('online_module', $format);
107: }
108:
109: /**
110: * getter
111: *
112: * @param string $format Dtype::FORMAT_xxxx constant
113: *
114: * @return mixed
115: */
116: public function online_ip($format = '')
117: {
118: return $this->getVar('online_ip', $format);
119: }
120: }
121: