1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | |
7: | |
8: | namespace Aurora\System\Module; |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | |
16: | |
17: | class TenantSettings extends \Aurora\System\AbstractSettings |
18: | { |
19: | protected $sTenantName; |
20: | |
21: | public function __construct($sModuleName, $sTenantName) |
22: | { |
23: | $this->sTenantName = $sTenantName; |
24: | $sTenantsPath = $sPath = \Aurora\System\Api::GetModuleManager()->GetModulesSettingsPath() . 'tenants'; |
25: | |
26: | if (!file_exists($sTenantsPath)) { |
27: | @\mkdir($sTenantsPath); |
28: | } |
29: | |
30: | $sPath = $sTenantsPath . '/' . $sTenantName . '/' . $sModuleName . '.config.json'; |
31: | parent::__construct($sPath); |
32: | } |
33: | |
34: | |
35: | |
36: | |
37: | public function SetProperty($oProperty) |
38: | { |
39: | $this->aContainer[$oProperty->Name] = $oProperty; |
40: | } |
41: | |
42: | |
43: | |
44: | |
45: | public function GetTenantName() |
46: | { |
47: | return $this->sTenantName; |
48: | } |
49: | } |
50: | |