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: * @copyright XOOPS Project (http://xoops.org)
18: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
19: * @package Avatars
20: * @author trabis <lusopoemas@gmail.com>
21: */
22:
23: class AvatarsUserlink extends XoopsObject
24: {
25: /**
26: * Constructor
27: */
28: public function __construct()
29: {
30: $this->initVar('avatar_id', XOBJ_DTYPE_INT, null, true);
31: $this->initVar('user_id', XOBJ_DTYPE_INT, null, true);
32: }
33: }
34:
35: class AvatarsUserlinkHandler extends XoopsPersistableObjectHandler
36: {
37: /**
38: * Constructor
39: *
40: * @param Connection|null $db {@link Connection}
41: */
42: public function __construct(Connection $db = null)
43: {
44: parent::__construct($db, 'avatars_user_link', 'AvatarsUserlink', 'avatar_id', 'user_id');
45: }
46: }
47: