Completed
Pull Request — master (#27)
by Michael
01:42
created

Configurator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 21 1
1
<?php
2
3
namespace XoopsModules\Xnewsletter\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     Publisher
21
 * @since       1.05
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 $icons           = [];
34
    public $uploadFolders   = [];
35
    public $copyBlankFiles  = [];
36
    public $copyTestFolders = [];
37
    public $templateFolders = [];
38
    public $oldFiles        = [];
39
    public $oldFolders      = [];
40
    public $renameTables    = [];
41
    public $moduleStats     = [];
42
    public $modCopyright;
43
44
    /**
45
     * Configurator constructor.
46
     */
47
    public function __construct()
48
    {
49
50
//        require dirname(dirname(__DIR__)) . '/config/config.php';
51
//        $config = getConfig();
52
53
        $config = include dirname(dirname(__DIR__)) . '/config/config.php';
54
        $this->name            = $config->name;
55
        $this->uploadFolders   = $config->uploadFolders;
56
        $this->copyBlankFiles  = $config->copyBlankFiles;
57
        $this->copyTestFolders = $config->copyTestFolders;
58
        $this->templateFolders = $config->templateFolders;
59
        $this->oldFiles        = $config->oldFiles;
60
        $this->oldFolders      = $config->oldFolders;
61
        $this->renameTables    = $config->renameTables;
62
        $this->moduleStats     = $config->moduleStats;
63
        $this->modCopyright    = $config->modCopyright;
64
65
        $this->paths = include dirname(dirname(__DIR__)) . '/config/paths.php';
66
        $this->icons = include dirname(dirname(__DIR__)) . '/config/icons.php';
67
    }
68
}
69