Code Duplication    Length = 47-47 lines in 4 locations

class/fieldattributes.php 1 location

@@ 34-80 (lines=47) @@
31
/**
32
 * Class TDMCreateFieldattributes.
33
 */
34
class TDMCreateFieldattributes extends XoopsObject
35
{
36
    /*
37
    *  @public function constructor class
38
    *  @param null
39
    */
40
    /**
41
     *
42
     */
43
    public function __construct()
44
    {
45
        $this->initVar('fieldattribute_id', XOBJ_DTYPE_INT);
46
        $this->initVar('fieldattribute_name', XOBJ_DTYPE_TXTBOX);
47
        $this->initVar('fieldattribute_value', XOBJ_DTYPE_TXTBOX);
48
    }
49
50
    /*
51
    *  @static function &getInstance
52
    *  @param null
53
    */
54
    /**
55
     * @return TDMCreateFieldElements
56
     */
57
    public static function &getInstance()
58
    {
59
        static $instance = false;
60
        if (!$instance) {
61
            $instance = new self();
62
        }
63
64
        return $instance;
65
    }
66
67
    /**
68
     * Get Values.
69
     */
70
    public function getValuesFieldattributes($keys = null, $format = null, $maxDepth = null)
71
    {
72
        $ret = $this->getValues($keys, $format, $maxDepth);
73
        // Values
74
        $ret['id'] = $this->getVar('fieldattribute_id');
75
        $ret['name'] = $this->getVar('fieldattribute_name');
76
        $ret['value'] = $this->getVar('fieldattribute_value');
77
78
        return $ret;
79
    }
80
}
81
82
/*
83
*  @Class TDMCreateFieldattributesHandler

class/fieldkey.php 1 location

@@ 34-80 (lines=47) @@
31
/**
32
 * Class TDMCreateFieldkey.
33
 */
34
class TDMCreateFieldkey extends XoopsObject
35
{
36
    /*
37
    *  @public function constructor class
38
    *  @param null
39
    */
40
    /**
41
     *
42
     */
43
    public function __construct()
44
    {
45
        $this->initVar('fieldkey_id', XOBJ_DTYPE_INT);
46
        $this->initVar('fieldkey_name', XOBJ_DTYPE_TXTBOX);
47
        $this->initVar('fieldkey_value', XOBJ_DTYPE_TXTBOX);
48
    }
49
50
    /*
51
    *  @static function &getInstance
52
    *  @param null
53
    */
54
    /**
55
     * @return TDMCreateFieldElements
56
     */
57
    public static function &getInstance()
58
    {
59
        static $instance = false;
60
        if (!$instance) {
61
            $instance = new self();
62
        }
63
64
        return $instance;
65
    }
66
67
    /**
68
     * Get Values.
69
     */
70
    public function getValuesFieldkey($keys = null, $format = null, $maxDepth = null)
71
    {
72
        $ret = $this->getValues($keys, $format, $maxDepth);
73
        // Values
74
        $ret['id'] = $this->getVar('fieldkey_id');
75
        $ret['name'] = $this->getVar('fieldkey_name');
76
        $ret['value'] = $this->getVar('fieldkey_value');
77
78
        return $ret;
79
    }
80
}
81
82
/*
83
*  @Class TDMCreateFieldkeyHandler

class/fieldnull.php 1 location

@@ 34-80 (lines=47) @@
31
/**
32
 * Class TDMCreateFieldnull.
33
 */
34
class TDMCreateFieldnull extends XoopsObject
35
{
36
    /*
37
    *  @public function constructor class
38
    *  @param null
39
    */
40
    /**
41
     *
42
     */
43
    public function __construct()
44
    {
45
        $this->initVar('fieldnull_id', XOBJ_DTYPE_INT);
46
        $this->initVar('fieldnull_name', XOBJ_DTYPE_TXTBOX);
47
        $this->initVar('fieldnull_value', XOBJ_DTYPE_TXTBOX);
48
    }
49
50
    /*
51
    *  @static function &getInstance
52
    *  @param null
53
    */
54
    /**
55
     * @return TDMCreateFieldElements
56
     */
57
    public static function &getInstance()
58
    {
59
        static $instance = false;
60
        if (!$instance) {
61
            $instance = new self();
62
        }
63
64
        return $instance;
65
    }
66
67
    /**
68
     * Get Values.
69
     */
70
    public function getValuesFieldnull($keys = null, $format = null, $maxDepth = null)
71
    {
72
        $ret = $this->getValues($keys, $format, $maxDepth);
73
        // Values
74
        $ret['id'] = $this->getVar('fieldnull_id');
75
        $ret['name'] = $this->getVar('fieldnull_name');
76
        $ret['value'] = $this->getVar('fieldnull_value');
77
78
        return $ret;
79
    }
80
}
81
82
/*
83
*  @Class TDMCreateFieldnullHandler

class/fieldtype.php 1 location

@@ 34-80 (lines=47) @@
31
/**
32
 * Class TDMCreateFieldtype.
33
 */
34
class TDMCreateFieldtype extends XoopsObject
35
{
36
    /*
37
    *  @public function constructor class
38
    *  @param null
39
    */
40
    /**
41
     *
42
     */
43
    public function __construct()
44
    {
45
        $this->initVar('fieldtype_id', XOBJ_DTYPE_INT);
46
        $this->initVar('fieldtype_name', XOBJ_DTYPE_TXTBOX);
47
        $this->initVar('fieldtype_value', XOBJ_DTYPE_TXTBOX);
48
    }
49
50
    /*
51
    *  @static function &getInstance
52
    *  @param null
53
    */
54
    /**
55
     * @return TDMCreateFieldElements
56
     */
57
    public static function &getInstance()
58
    {
59
        static $instance = false;
60
        if (!$instance) {
61
            $instance = new self();
62
        }
63
64
        return $instance;
65
    }
66
67
    /**
68
     * Get Values.
69
     */
70
    public function getValuesFieldtype($keys = null, $format = null, $maxDepth = null)
71
    {
72
        $ret = $this->getValues($keys, $format, $maxDepth);
73
        // Values
74
        $ret['id'] = $this->getVar('fieldtype_id');
75
        $ret['name'] = $this->getVar('fieldtype_name');
76
        $ret['value'] = $this->getVar('fieldtype_value');
77
78
        return $ret;
79
    }
80
}
81
82
/*
83
*  @Class TDMCreateFieldtypeHandler