1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | |
7: | |
8: | namespace Aurora\System\Module; |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | |
16: | |
17: | class Decorator |
18: | { |
19: | |
20: | |
21: | |
22: | |
23: | protected $sModuleName; |
24: | |
25: | |
26: | |
27: | |
28: | |
29: | public function __construct($sModuleName) |
30: | { |
31: | $this->sModuleName = $sModuleName; |
32: | } |
33: | |
34: | |
35: | |
36: | |
37: | |
38: | |
39: | |
40: | public function __call($sMethodName, $aArguments) |
41: | { |
42: | $mResult = false; |
43: | $oModule = \Aurora\System\Api::GetModule($this->sModuleName); |
44: | if ($oModule instanceof AbstractModule) { |
45: | $mResult = $oModule->CallMethod($sMethodName, $aArguments); |
46: | } |
47: | |
48: | return $mResult; |
49: | } |
50: | |
51: | public function GetSettings() |
52: | { |
53: | $mResult = null; |
54: | |
55: | $oModule = \Aurora\System\Api::GetModule($this->sModuleName); |
56: | if ($oModule instanceof AbstractModule) { |
57: | $mResult = $oModule->GetSettings(); |
58: | } |
59: | |
60: | return $mResult; |
61: | } |
62: | |
63: | public function GetErrors() |
64: | { |
65: | $mResult = null; |
66: | |
67: | $oModule = \Aurora\System\Api::GetModule($this->sModuleName); |
68: | if ($oModule instanceof AbstractModule) { |
69: | $mResult = $oModule->GetErrors(); |
70: | } |
71: | |
72: | return $mResult; |
73: | } |
74: | |
75: | public function GetAdditionalEntityFieldsToEdit() |
76: | { |
77: | $mResult = null; |
78: | |
79: | $oModule = \Aurora\System\Api::GetModule($this->sModuleName); |
80: | if ($oModule instanceof AbstractModule) { |
81: | $mResult = $oModule->GetAdditionalEntityFieldsToEdit(); |
82: | } |
83: | |
84: | return $mResult; |
85: | } |
86: | } |
87: | |
88: | function Decorator() |
89: | { |
90: | echo 'Decorator'; |
91: | } |
92: | |