Store.php 632 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * FecShop file.
  4. * @link http://www.fecshop.com/
  5. * @copyright Copyright (c) 2016 FecShop Software LLC
  6. * @license http://www.fecshop.com/license/
  7. */
  8. namespace fecshop\components;
  9. use Yii;
  10. use yii\base\BootstrapInterface;
  11. use yii\base\Component;
  12. /**
  13. * @author Terry Zhao <2358269014@qq.com>
  14. * @since 1.0
  15. */
  16. class Store extends Component implements BootstrapInterface
  17. {
  18. public $appName;
  19. public function bootstrap($app)
  20. {
  21. if ($this->appName == 'appadmin') {
  22. Yii::$service->admin->bootstrap($app);
  23. } else {
  24. Yii::$service->store->bootstrap($app);
  25. }
  26. }
  27. }