|
1
|
|
|
<?php declare(strict_types=1); |
|
2
|
|
|
|
|
3
|
|
|
namespace XoopsModules\Xhelp; |
|
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
|
|
|
* @author Eric Juden <[email protected]> |
|
19
|
|
|
* @author XOOPS Development Team |
|
20
|
|
|
*/ |
|
21
|
|
|
|
|
22
|
|
|
if (!\defined('XHELP_CLASS_PATH')) { |
|
23
|
|
|
exit(); |
|
24
|
|
|
} |
|
25
|
|
|
|
|
26
|
|
|
// require_once XHELP_CLASS_PATH . '/BaseObjectHandler.php'; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* Xhelp\Notification class |
|
30
|
|
|
* |
|
31
|
|
|
* @author Eric Juden <[email protected]> |
|
32
|
|
|
*/ |
|
33
|
|
|
class Notification extends \XoopsObject |
|
34
|
|
|
{ |
|
35
|
|
|
/** |
|
36
|
|
|
* Xhelp\Notification constructor. |
|
37
|
|
|
* @param array|null $id |
|
38
|
|
|
*/ |
|
39
|
|
|
public function __construct(array $id = null) |
|
40
|
|
|
{ |
|
41
|
|
|
$this->initVar('notif_id', \XOBJ_DTYPE_INT, null, false); |
|
42
|
|
|
$this->initVar('staff_setting', \XOBJ_DTYPE_INT, null, false); |
|
43
|
|
|
$this->initVar('user_setting', \XOBJ_DTYPE_INT, null, false); |
|
44
|
|
|
$this->initVar('staff_options', \XOBJ_DTYPE_ARRAY, null, false, 1000000); |
|
45
|
|
|
|
|
46
|
|
|
if (null !== $id) { |
|
47
|
|
|
if (\is_array($id)) { |
|
|
|
|
|
|
48
|
|
|
$this->assignVars($id); |
|
49
|
|
|
} |
|
50
|
|
|
} else { |
|
51
|
|
|
$this->setNew(); |
|
52
|
|
|
} |
|
53
|
|
|
} |
|
54
|
|
|
} //end of class |
|
55
|
|
|
|