Misc::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace XoopsModules\Rssfit;
6
7
/*
8
 * You may not change or alter any portion of this comment or credits
9
 * of supporting developers from this source code or any supporting source code
10
 * which is considered copyrighted (c) material of the original comment or credit authors.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
 */
16
17
/**
18
 * @copyright    XOOPS Project (https://xoops.org)
19
 * @license      GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
20
 * @package      RSSFit - Extendable XML news feed generator
21
 * @author       NS Tai (aka tuff) <http://www.brandycoke.com>
22
 * @author       XOOPS Development Team
23
 */
24
25
if (!\defined('RSSFIT_ROOT_PATH')) {
26
    exit();
27
}
28
29
/**
30
 * Class Misc
31
 * @package XoopsModules\Rssfit
32
 */
33
class Misc extends \XoopsObject
34
{
35
    public function __construct()
36
    {
37
        parent::__construct();
38
        //  key, data_type, value, req, max, opt
39
        $this->initVar('misc_id', \XOBJ_DTYPE_INT, null, false);
40
        $this->initVar('misc_category', \XOBJ_DTYPE_TXTBOX, '', true, 15);
41
        $this->initVar('misc_title', \XOBJ_DTYPE_TXTBOX, '', false, 255);
42
        $this->initVar('misc_content', \XOBJ_DTYPE_TXTAREA, '', false);
43
        $this->initVar('misc_setting', \XOBJ_DTYPE_ARRAY, '');
44
    }
45
46
    public function setDoHtml(bool $do = true): void
47
    {
48
        $this->vars['dohtml']['value'] = $do;
49
    }
50
51
    public function setDoBr(bool $do = true): void
52
    {
53
        $this->vars['dobr']['value'] = $do;
54
    }
55
}
56