Message   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
eloc 18
dl 0
loc 25
rs 10
c 1
b 1
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 19 1
1
<?php
2
3
namespace XoopsModules\Xfguestbook;
4
5
/*
6
 * You may not change or alter any portion of this comment or credits
7
 * of supporting developers from this source code or any supporting source code
8
 * which is considered copyrighted (c) material of the original comment or credit authors.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 */
14
15
/**
16
 * @copyright    {@link https://xoops.org/ XOOPS Project}
17
 * @license      {@link https://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later}
18
 * @package
19
 * @since
20
 * @author       XOOPS Development Team
21
 */
22
23
/**
24
 * Class Message
25
 */
26
class Message extends \XoopsObject
27
{
28
29
    /**
30
     * Message constructor.
31
     */
32
    public function __construct()
33
    {
34
        parent::__construct();
35
        $this->initVar('msg_id', \XOBJ_DTYPE_INT, null, false);
36
        $this->initVar('user_id', \XOBJ_DTYPE_INT, null, false);
37
        $this->initVar('uname', \XOBJ_DTYPE_TXTBOX, '', false);
38
        $this->initVar('title', \XOBJ_DTYPE_TXTBOX, '', true);
39
        $this->initVar('message', \XOBJ_DTYPE_TXTAREA, '', false);
40
        $this->initVar('note', \XOBJ_DTYPE_TXTAREA, '', false);
41
        $this->initVar('post_time', \XOBJ_DTYPE_STIME, null, false);
42
        $this->initVar('email', \XOBJ_DTYPE_EMAIL, '', false);
43
        $this->initVar('url', \XOBJ_DTYPE_URL, '', false);
44
        $this->initVar('poster_ip', \XOBJ_DTYPE_OTHER, '', false);
45
        $this->initVar('moderate', \XOBJ_DTYPE_INT, null, false);
46
        $this->initVar('gender', \XOBJ_DTYPE_TXTBOX, '', false, 1);
47
        $this->initVar('country', \XOBJ_DTYPE_TXTBOX, '', false, 5);
48
        $this->initVar('photo', \XOBJ_DTYPE_TXTBOX, '', false); // added v2.20
49
        $this->initVar('flagdir', \XOBJ_DTYPE_TXTBOX, '', false); // added v2.30
50
        $this->initVar('other', \XOBJ_DTYPE_TXTBOX, '', false); // added v2.30
51
    }
52
}
53