|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace XoopsModules\Xoopspartners\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 |
|
21
|
|
|
* @since 1.05 |
|
22
|
|
|
*/ |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* Class Configurator |
|
26
|
|
|
*/ |
|
27
|
|
|
class Configurator |
|
28
|
|
|
{ |
|
29
|
|
|
public $name; |
|
30
|
|
|
public $paths = []; |
|
31
|
|
|
public $uploadFolders = []; |
|
32
|
|
|
public $copyBlankFiles = []; |
|
33
|
|
|
public $copyTestFolders = []; |
|
34
|
|
|
public $templateFolders = []; |
|
35
|
|
|
public $oldFiles = []; |
|
36
|
|
|
public $oldFolders = []; |
|
37
|
|
|
public $renameTables = []; |
|
38
|
|
|
public $modCopyright; |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* Configurator constructor. |
|
42
|
|
|
*/ |
|
43
|
|
|
public function __construct() |
|
44
|
|
|
{ |
|
45
|
|
|
$moduleDirName = \basename(\dirname(\dirname(__DIR__))); |
|
46
|
|
|
$moduleDirNameUpper = mb_strtoupper($moduleDirName); |
|
47
|
|
|
|
|
48
|
|
|
$config = require \dirname(\dirname(__DIR__)) . '/config/config.php'; |
|
49
|
|
|
|
|
50
|
|
|
$this->name = $config->name; |
|
51
|
|
|
$this->paths = $config->paths; |
|
52
|
|
|
$this->uploadFolders = $config->uploadFolders; |
|
53
|
|
|
$this->copyBlankFiles = $config->copyBlankFiles; |
|
54
|
|
|
$this->copyTestFolders = $config->copyTestFolders; |
|
55
|
|
|
$this->templateFolders = $config->templateFolders; |
|
56
|
|
|
$this->oldFiles = $config->oldFiles; |
|
57
|
|
|
$this->oldFolders = $config->oldFolders; |
|
58
|
|
|
$this->renameTables = $config->renameTables; |
|
59
|
|
|
$this->modCopyright = $config->modCopyright; |
|
60
|
|
|
} |
|
61
|
|
|
} |
|
62
|
|
|
|