ListingHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace XoopsModules\Adslight;
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
 * Module: Adslight
17
 *
18
 * @category        Module
19
 * @author          XOOPS Development Team <https://xoops.org>
20
 * @copyright       {@link https://xoops.org/ XOOPS Project}
21
 * @license         GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
22
 * @link            https://xoops.org/
23
 * @since           1.0.0
24
 */
25
26
use Xmf\Module\Helper\Permission;
27
28
$moduleDirName = \basename(\dirname(__DIR__));
29
$permHelper    = new Permission();
30
31
/**
32
 * Class ListingHandler
33
 */
34
class ListingHandler extends \XoopsPersistableObjectHandler
35
{
36
    private const TABLE      = 'adslight_listing';
37
    private const ENTITY     = Listing::class;
38
    private const ENTITYNAME = 'Listing';
39
    private const KEYNAME    = 'lid';
40
    private const IDENTIFIER = 'title';
41
42
    /**
43
     * Constructor
44
     */
45
    public function __construct(?\XoopsDatabase $xoopsDatabase = null)
46
    {
47
        $this->db = $xoopsDatabase;
48
        parent::__construct($xoopsDatabase, static::TABLE, static::ENTITY, static::KEYNAME, static::IDENTIFIER);
49
    }
50
}
51