Configurator::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 35
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 14
nc 1
nop 0
dl 0
loc 35
rs 9.7998
c 0
b 0
f 0
1
<?php
2
3
namespace XoopsModules\Chess\Common;
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
 * Configurator Class
16
 *
17
 * @copyright   XOOPS Project (https://xoops.org)
18
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
19
 * @author      XOOPS Development Team
20
 * @package     Chess
21
 * @since       2.01
22
 */
23
24
// require_once dirname(dirname(__DIR__)) . '/include/common.php';
25
26
/**
27
 * Class Configurator
28
 */
29
class Configurator
30
{
31
    public $name;
32
    public $paths = [];
33
    public $uploadFolders = [];
34
    public $copyBlankFiles = [];
35
    public $copyTestFolders = [];
36
    public $templateFolders = [];
37
    public $oldFiles = [];
38
    public $oldFolders = [];
39
    public $renameTables = [];
40
    public $moduleStats = [];
41
    public $modCopyright;
42
    public $icons;
43
44
    /**
45
     * Configurator constructor.
46
     */
47
    public function __construct()
48
    {
49
        //        $moduleDirName      = basename(dirname(dirname(__DIR__)));
50
        //        $moduleDirNameUpper = mb_strtoupper($moduleDirName);
51
52
        //        require dirname(dirname(__DIR__)) . '/config/config.php';
53
        //        $config = getConfig();
54
55
        $config = include \dirname(__DIR__, 2) . '/config/config.php';
56
57
        $this->name = $config->name;
58
59
        $this->paths = $config->paths;
60
61
        $this->uploadFolders = $config->uploadFolders;
62
63
        $this->copyBlankFiles = $config->copyBlankFiles;
64
65
        $this->copyTestFolders = $config->copyTestFolders;
66
67
        $this->templateFolders = $config->templateFolders;
68
69
        $this->oldFiles = $config->oldFiles;
70
71
        $this->oldFolders = $config->oldFolders;
72
73
        $this->renameTables = $config->renameTables;
74
75
        $this->moduleStats = $config->moduleStats;
76
77
        $this->modCopyright = $config->modCopyright;
78
79
        $this->icons = include \dirname(__DIR__, 2) . '/config/icons.php';
80
81
        $this->paths = include \dirname(__DIR__, 2) . '/config/paths.php';
82
    }
83
}
84