Passed
Push — master ( 37a2f2...290aa0 )
by Michael
02:35
created

Configurator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 25
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 18 1
1
<?php namespace XoopsModules\Xfguestbook\Common;
2
3
/*
4
 You may not change or alter any portion of this comment or credits
5
 of supporting developers from this source code or any supporting source code
6
 which is considered copyrighted (c) material of the original comment or credit authors.
7
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
/**
13
 * Configurator Class
14
 *
15
 * @copyright   XOOPS Project (https://xoops.org)
16
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
17
 * @author      XOOPS Development Team
18
 * @package     Publisher
19
 * @since       1.05
20
 *
21
 */
22
23
//require_once dirname(dirname(__DIR__)) . '/include/common.php';
24
25
/**
26
 * Class Configurator
27
 */
28
class Configurator
29
{
30
    public $name;
31
    public $paths           = [];
32
    public $uploadFolders   = [];
33
    public $copyBlankFiles  = [];
34
    public $copyTestFolders = [];
35
    public $templateFolders = [];
36
    public $oldFiles        = [];
37
    public $oldFolders      = [];
38
    public $renameTables    = [];
39
    public $modCopyright;
40
41
    /**
42
     * Configurator constructor.
43
     */
44
    public function __construct()
45
    {
46
        $moduleDirName = basename(dirname(dirname(__DIR__)));
47
        $moduleDirNameUpper   = strtoupper($moduleDirName);
48
49
        require dirname(dirname(__DIR__)) . '/include/config.php';
50
        $config = getConfig();
51
52
        $this->name            = $config->name;
53
        $this->paths           = $config->paths;
54
        $this->uploadFolders   = $config->uploadFolders;
55
        $this->copyBlankFiles  = $config->copyBlankFiles;
56
        $this->copyTestFolders = $config->copyTestFolders;
57
        $this->templateFolders = $config->templateFolders;
58
        $this->oldFiles        = $config->oldFiles;
59
        $this->oldFolders      = $config->oldFolders;
60
        $this->renameTables    = $config->renameTables;
61
        $this->modCopyright    = $config->modCopyright;
62
63
    }
64
}
65