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: | |
38: | public function SetProperty($sName, $oProperty) |
39: | { |
40: | $this->aContainer[$sName] = $oProperty; |
41: | } |
42: | |
43: | |
44: | |
45: | |
46: | public function GetTenantName() |
47: | { |
48: | return $this->sTenantName; |
49: | } |
50: | } |
51: | |