-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jianyan74
committed
Nov 15, 2019
1 parent
b52b503
commit f7ada31
Showing
33 changed files
with
104 additions
and
2,689 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,24 @@ | ||
<?php | ||
|
||
namespace addons\RfWechat\common\components; | ||
namespace addons\RfMerchants\common\components; | ||
|
||
use common\helpers\AddonHelper; | ||
use Yii; | ||
use common\enums\AppEnum; | ||
use common\interfaces\AddonWidget; | ||
|
||
/** | ||
* Bootstrap | ||
* | ||
* Class Bootstrap | ||
* @package addons\RfWechat\common\config | ||
* @package addons\RfMerchants\common\config | ||
*/ | ||
class Bootstrap implements AddonWidget | ||
{ | ||
/** | ||
* @param $addon | ||
* @return mixed|void | ||
* @throws \yii\base\InvalidConfigException | ||
*/ | ||
* @param $addon | ||
* @return mixed|void | ||
*/ | ||
public function run($addon) | ||
{ | ||
// 动态注入服务 | ||
Yii::$app->set('wechatServices', [ | ||
'class' => 'addons\RfWechat\services\Application', | ||
]); | ||
|
||
// 注册资源 | ||
if (in_array(Yii::$app->id, [AppEnum::MERCHANT, AppEnum::BACKEND])) { | ||
AddonHelper::filePath(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.