1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11:
12: use Xoops\Core\Database\Connection;
13: use Xoops\Core\Kernel\XoopsObject;
14: use Xoops\Core\Kernel\XoopsPersistableObjectHandler;
15:
16: 17: 18: 19: 20: 21: 22: 23: 24: 25:
26:
27: include_once dirname(__DIR__) . '/include/common.php';
28:
29: class PublisherRating extends XoopsObject
30: {
31: 32: 33:
34: public function __construct()
35: {
36: $this->initVar("ratingid", XOBJ_DTYPE_INT, null, false);
37: $this->initVar("itemid", XOBJ_DTYPE_INT, null, false);
38: $this->initVar("uid", XOBJ_DTYPE_INT, null, false);
39: $this->initVar("rate", XOBJ_DTYPE_INT, null, false);
40: $this->initVar("ip", XOBJ_DTYPE_TXTAREA, null, false);
41: $this->initVar("date", XOBJ_DTYPE_INT, null, false);
42: }
43: }
44:
45: class PublisherRatingHandler extends XoopsPersistableObjectHandler
46: {
47: 48: 49:
50: public function __construct(Connection $db = null)
51: {
52: parent::__construct($db, 'publisher_rating', 'PublisherRating', 'ratingid', 'itemid');
53: }
54: }
55: