1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: use Xoops\Core\Database\Connection;
13: use Xoops\Core\Kernel\XoopsObject;
14: use Xoops\Core\Kernel\XoopsPersistableObjectHandler;
15:
16: /**
17: * Extended User Profile
18: *
19: * @copyright XOOPS Project (http://xoops.org)
20: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
21: * @package profile
22: * @since 2.3.0
23: * @author Jan Pedersen
24: * @author Taiwen Jiang <phppp@users.sourceforge.net>
25: * @version $Id$
26: */
27:
28: class ProfileCategory extends XoopsObject
29: {
30: /**
31: * Constructor
32: */
33: public function __construct()
34: {
35: $this->initVar('cat_id', XOBJ_DTYPE_INT, null, true);
36: $this->initVar('cat_title', XOBJ_DTYPE_TXTBOX);
37: $this->initVar('cat_description', XOBJ_DTYPE_TXTAREA);
38: $this->initVar('cat_weight', XOBJ_DTYPE_INT);
39: }
40: }
41:
42: class ProfileCategoryHandler extends XoopsPersistableObjectHandler
43: {
44: /**
45: * @param null|Connection $db database
46: */
47: public function __construct(Connection $db = null)
48: {
49: parent::__construct($db, 'profile_category', 'profilecategory', 'cat_id', 'cat_title');
50: }
51: }
52: