Skip to content

Commit 8ef2ffc

Browse files
Merge pull request #66 from opensource-labs/fix-var-name
fix var name typo
2 parents 962291b + 479c340 commit 8ef2ffc

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

services/Store.php

+13-8
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ public function isApiStore()
7676
}
7777
}
7878

79-
// 得到当前入口的名字
79+
80+
/**
81+
* 得到当前入口的名字
82+
* @return mixed
83+
*/
8084
public function getCurrentAppName()
8185
{
8286
return Yii::$app->params['appName'];
@@ -87,16 +91,17 @@ public function getCurrentAppName()
8791
* if you not config this ,default class property will be set.
8892
* if current store_code is not config , InvalidValueException will be throw.
8993
* class property $currentStore will be set value $store_code.
94+
* @param $app
9095
*/
9196
protected function actionBootstrap($app)
9297
{
9398
$host = explode('//', $app->getHomeUrl());
9499
$stores = $this->stores;
95-
$init_compelte = 0;
100+
$init_complete = 0;
96101
if (is_array($stores) && !empty($stores)) {
97102
foreach ($stores as $store_code => $store) {
98103
if ($host[1] == $store_code) {
99-
$this->html5DevideCheckAndRedirect($store_code, $store);
104+
$this->html5DeviceCheckAndRedirect($store_code, $store);
100105
Yii::$service->store->currentStore = $store_code;
101106
$this->store = $store;
102107
if (isset($store['language']) && !empty($store['language'])) {
@@ -126,9 +131,9 @@ protected function actionBootstrap($app)
126131
}
127132
Yii::$service->page->currency->initCurrency($currency);
128133
/**
129-
* current domian is config is store config.
134+
* current domain is config is store config.
130135
*/
131-
$init_compelte = 1;
136+
$init_complete = 1;
132137
$this->thirdLogin = $store['thirdLogin'];
133138
/**
134139
* appserver 部分
@@ -160,18 +165,18 @@ protected function actionBootstrap($app)
160165
}
161166
}
162167
}
163-
if (!$init_compelte) {
168+
if (!$init_complete) {
164169
throw new InvalidValueException('this domain is not config in store component');
165170
}
166171
}
167172

168173
/**
169174
* @param $store_code | String
170175
* @param $store | Array
171-
* mobile devide url redirect.
176+
* mobile device url redirect.
172177
* pc端自动跳转到html5端的检测
173178
*/
174-
protected function html5DevideCheckAndRedirect($store_code, $store)
179+
protected function html5DeviceCheckAndRedirect($store_code, $store)
175180
{
176181
if (!isset($store['mobile'])) {
177182
return;

0 commit comments

Comments
 (0)