1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace XoopsModules\Modulebuilder; |
4
|
|
|
|
5
|
|
|
use XoopsModules\Modulebuilder; |
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
|
|
|
* modulebuilder module. |
18
|
|
|
* |
19
|
|
|
* @copyright XOOPS Project (https://xoops.org) |
20
|
|
|
* @license GNU GPL 2 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
21
|
|
|
* |
22
|
|
|
* @since 2.5.5 |
23
|
|
|
* |
24
|
|
|
* @author Txmod Xoops <[email protected]> |
25
|
|
|
* |
26
|
|
|
*/ |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Class Fieldnull. |
30
|
|
|
*/ |
31
|
|
|
class Fieldnull extends \XoopsObject |
32
|
|
|
{ |
33
|
|
|
/** |
34
|
|
|
* @public function constructor class |
35
|
|
|
* @param null |
36
|
|
|
*/ |
37
|
|
|
public function __construct() |
38
|
|
|
{ |
39
|
|
|
$this->initVar('fieldnull_id', XOBJ_DTYPE_INT); |
40
|
|
|
$this->initVar('fieldnull_name', XOBJ_DTYPE_TXTBOX); |
41
|
|
|
$this->initVar('fieldnull_value', XOBJ_DTYPE_TXTBOX); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @static function getInstance |
46
|
|
|
* @param null |
47
|
|
|
* @return Fieldnull |
48
|
|
|
*/ |
49
|
|
|
public static function getInstance() |
50
|
|
|
{ |
51
|
|
|
static $instance = false; |
52
|
|
|
if (!$instance) { |
53
|
|
|
$instance = new self(); |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
return $instance; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* Get Values. |
61
|
|
|
* @param null $keys |
|
|
|
|
62
|
|
|
* @param null $format |
|
|
|
|
63
|
|
|
* @param null $maxDepth |
|
|
|
|
64
|
|
|
* @return array |
65
|
|
|
*/ |
66
|
|
|
public function getValuesFieldnull($keys = null, $format = null, $maxDepth = null) |
67
|
|
|
{ |
68
|
|
|
$ret = $this->getValues($keys, $format, $maxDepth); |
69
|
|
|
// Values |
70
|
|
|
$ret['id'] = $this->getVar('fieldnull_id'); |
71
|
|
|
$ret['name'] = $this->getVar('fieldnull_name'); |
72
|
|
|
$ret['value'] = $this->getVar('fieldnull_value'); |
73
|
|
|
|
74
|
|
|
return $ret; |
75
|
|
|
} |
76
|
|
|
} |
77
|
|
|
|