@@ -76,7 +76,11 @@ public function isApiStore()
76
76
}
77
77
}
78
78
79
- // 得到当前入口的名字
79
+
80
+ /**
81
+ * 得到当前入口的名字
82
+ * @return mixed
83
+ */
80
84
public function getCurrentAppName ()
81
85
{
82
86
return Yii::$ app ->params ['appName ' ];
@@ -87,16 +91,17 @@ public function getCurrentAppName()
87
91
* if you not config this ,default class property will be set.
88
92
* if current store_code is not config , InvalidValueException will be throw.
89
93
* class property $currentStore will be set value $store_code.
94
+ * @param $app
90
95
*/
91
96
protected function actionBootstrap ($ app )
92
97
{
93
98
$ host = explode ('// ' , $ app ->getHomeUrl ());
94
99
$ stores = $ this ->stores ;
95
- $ init_compelte = 0 ;
100
+ $ init_complete = 0 ;
96
101
if (is_array ($ stores ) && !empty ($ stores )) {
97
102
foreach ($ stores as $ store_code => $ store ) {
98
103
if ($ host [1 ] == $ store_code ) {
99
- $ this ->html5DevideCheckAndRedirect ($ store_code , $ store );
104
+ $ this ->html5DeviceCheckAndRedirect ($ store_code , $ store );
100
105
Yii::$ service ->store ->currentStore = $ store_code ;
101
106
$ this ->store = $ store ;
102
107
if (isset ($ store ['language ' ]) && !empty ($ store ['language ' ])) {
@@ -126,9 +131,9 @@ protected function actionBootstrap($app)
126
131
}
127
132
Yii::$ service ->page ->currency ->initCurrency ($ currency );
128
133
/**
129
- * current domian is config is store config.
134
+ * current domain is config is store config.
130
135
*/
131
- $ init_compelte = 1 ;
136
+ $ init_complete = 1 ;
132
137
$ this ->thirdLogin = $ store ['thirdLogin ' ];
133
138
/**
134
139
* appserver 部分
@@ -160,18 +165,18 @@ protected function actionBootstrap($app)
160
165
}
161
166
}
162
167
}
163
- if (!$ init_compelte ) {
168
+ if (!$ init_complete ) {
164
169
throw new InvalidValueException ('this domain is not config in store component ' );
165
170
}
166
171
}
167
172
168
173
/**
169
174
* @param $store_code | String
170
175
* @param $store | Array
171
- * mobile devide url redirect.
176
+ * mobile device url redirect.
172
177
* pc端自动跳转到html5端的检测
173
178
*/
174
- protected function html5DevideCheckAndRedirect ($ store_code , $ store )
179
+ protected function html5DeviceCheckAndRedirect ($ store_code , $ store )
175
180
{
176
181
if (!isset ($ store ['mobile ' ])) {
177
182
return ;
0 commit comments