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: 28: 29:
30: class PublisherMimetype extends XoopsObject
31: {
32: public function __construct()
33: {
34: $this->initVar('mime_id', XOBJ_DTYPE_INT, null, false);
35: $this->initVar('mime_ext', XOBJ_DTYPE_TXTBOX, null, true, 60);
36: $this->initVar('mime_types', XOBJ_DTYPE_TXTAREA, null, false, 1024);
37: $this->initVar('mime_name', XOBJ_DTYPE_TXTBOX, null, true, 255);
38: $this->initVar('mime_admin', XOBJ_DTYPE_INT, null, false);
39: $this->initVar('mime_user', XOBJ_DTYPE_INT, null, false);
40: }
41: }
42:
43: class PublisherMimetypeHandler extends XoopsPersistableObjectHandler
44: {
45: 46: 47: 48: 49:
50: public function __construct(Connection $db = null)
51: {
52: parent::__construct($db, 'publisher_mimetypes', 'PublisherMimetype', 'mime_id', 'mime_ext');
53: }
54: }
55: