1 | <?php |
||
43 | class Configs extends \mdm\admin\BaseObject |
||
44 | { |
||
45 | const CACHE_TAG = 'mdm.admin'; |
||
46 | |||
47 | /** |
||
48 | * @var ManagerInterface . |
||
49 | */ |
||
50 | public $authManager = 'authManager'; |
||
51 | |||
52 | /** |
||
53 | * @var Connection Database connection. |
||
54 | */ |
||
55 | public $db = 'db'; |
||
56 | |||
57 | /** |
||
58 | * @var Connection Database connection. |
||
59 | */ |
||
60 | public $userDb = 'db'; |
||
61 | |||
62 | /** |
||
63 | * @var Cache Cache component. |
||
64 | */ |
||
65 | public $cache = 'cache'; |
||
66 | |||
67 | /** |
||
68 | * @var integer Cache duration. Default to a hour. |
||
69 | */ |
||
70 | public $cacheDuration = 3600; |
||
71 | |||
72 | /** |
||
73 | * @var string Menu table name. |
||
74 | */ |
||
75 | public $menuTable = '{{%menu}}'; |
||
76 | |||
77 | /** |
||
78 | * @var string Menu table name. |
||
79 | */ |
||
80 | public $userTable = '{{%user}}'; |
||
81 | |||
82 | /** |
||
83 | * @var integer Default status user signup. 10 mean active. |
||
84 | */ |
||
85 | public $defaultUserStatus = 10; |
||
86 | |||
87 | /** |
||
88 | * @var integer Number of user role. |
||
89 | */ |
||
90 | public $userRolePageSize = 100; |
||
91 | |||
92 | /** |
||
93 | * @var boolean If true then AccessControl only check if route are registered. |
||
94 | */ |
||
95 | public $onlyRegisteredRoute = false; |
||
96 | |||
97 | /** |
||
98 | * @var boolean If false then AccessControl will check without Rule. |
||
99 | */ |
||
100 | public $strict = true; |
||
101 | |||
102 | /** |
||
103 | * @var array |
||
104 | */ |
||
105 | public $options; |
||
106 | |||
107 | /** |
||
108 | * @var array|false Used for multiple application |
||
109 | * ```php |
||
110 | * [ |
||
111 | * 'frontend' => [ |
||
112 | * '@common/config/main.php', |
||
113 | * '@common/config/main-local.php', |
||
114 | * '@frontend/config/main.php', |
||
115 | * '@frontend/config/main-local.php', |
||
116 | * ], |
||
117 | * 'backend' => [ |
||
118 | * '@common/config/main.php', |
||
119 | * '@common/config/main-local.php', |
||
120 | * '@backend/config/main.php', |
||
121 | * '@backend/config/main-local.php', |
||
122 | * ], |
||
123 | * ] |
||
124 | * ``` * |
||
125 | */ |
||
126 | public $advanced; |
||
127 | |||
128 | /** |
||
129 | * @var self Instance of self |
||
130 | */ |
||
131 | private static $_instance; |
||
132 | private static $_classes = [ |
||
133 | 'db' => 'yii\db\Connection', |
||
134 | 'userDb' => 'yii\db\Connection', |
||
135 | 'cache' => 'yii\caching\Cache', |
||
136 | 'authManager' => 'yii\rbac\ManagerInterface', |
||
137 | ]; |
||
138 | |||
139 | /** |
||
140 | * @inheritdoc |
||
141 | */ |
||
142 | public function init() |
||
153 | |||
154 | /** |
||
155 | * Create instance of self |
||
156 | * @return static |
||
157 | */ |
||
158 | public static function instance() |
||
171 | |||
172 | public static function __callStatic($name, $arguments) |
||
185 | |||
186 | /** |
||
187 | * @return Connection |
||
188 | */ |
||
189 | public static function db() |
||
193 | |||
194 | /** |
||
195 | * @return Connection |
||
196 | */ |
||
197 | public static function userDb() |
||
201 | |||
202 | /** |
||
203 | * @return Cache |
||
204 | */ |
||
205 | public static function cache() |
||
209 | |||
210 | /** |
||
211 | * @return ManagerInterface |
||
212 | */ |
||
213 | public static function authManager() |
||
217 | /** |
||
218 | * @return integer |
||
219 | */ |
||
220 | public static function cacheDuration() |
||
224 | |||
225 | /** |
||
226 | * @return string |
||
227 | */ |
||
228 | public static function menuTable() |
||
232 | |||
233 | /** |
||
234 | * @return string |
||
235 | */ |
||
236 | public static function userTable() |
||
240 | |||
241 | /** |
||
242 | * @return string |
||
243 | */ |
||
244 | public static function defaultUserStatus() |
||
248 | |||
249 | /** |
||
250 | * @return boolean |
||
251 | */ |
||
252 | public static function onlyRegisteredRoute() |
||
256 | |||
257 | /** |
||
258 | * @return boolean |
||
259 | */ |
||
260 | public static function strict() |
||
264 | |||
265 | /** |
||
266 | * @return int |
||
267 | */ |
||
268 | public static function userRolePageSize() |
||
272 | } |
||
273 |