Passed
Pull Request — master (#4)
by Michael
02:50
created

__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
eloc 1
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * TDMDownload
4
 *
5
 * You may not change or alter any portion of this comment or credits
6
 * of supporting developers from this source code or any supporting source code
7
 * which is considered copyrighted (c) material of the original comment or credit authors.
8
 * This program is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
 *
12
 * @copyright   Gregory Mage (Aka Mage) and Hossein Azizabadi (Aka voltan)
13
 * @license     GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
14
 * @author      Gregory Mage (Aka Mage) and Hossein Azizabadi (Aka voltan)
15
 */
16
17
if (!defined("XOOPS_ROOT_PATH")) {
18
    die("XOOPS root path not defined");
19
}
20
21
class TDMDownloads_downlimit extends XoopsObject
22
{
23
// constructor
24
    public function __construct()
25
    {
26
        $this->initVar("downlimit_id",XOBJ_DTYPE_INT,null,false,11);
27
        $this->initVar("downlimit_lid",XOBJ_DTYPE_INT,null,false,11);
28
        $this->initVar("downlimit_uid",XOBJ_DTYPE_INT,null,false,11);
29
        $this->initVar("downlimit_hostname",XOBJ_DTYPE_TXTBOX, null, false);
30
        $this->initVar("downlimit_date",XOBJ_DTYPE_INT,null,false,10);
31
    }
32
    function TDMDownloads_downlimit()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
33
    {
34
        $this->__construct();
35
    }
36
}
37
38
class TDMDownloadstdmdownloads_downlimitHandler extends XoopsPersistableObjectHandler
39
{
40
    public function __construct(&$db)
41
    {
42
        parent::__construct($db, "tdmdownloads_downlimit", 'tdmdownloads_downlimit', 'downlimit_id', 'downlimit_lid');
43
    }
44
}
45