fecshop_local.php 800 B

123456789101112131415161718192021222324252627282930313233
  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. /**
  9. * 本文件在app/web/index.php 处引入。
  10. * 本配置文件为各个入口部分的公用模块和服务。
  11. */
  12. $modules = [];
  13. foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
  14. $modules = array_merge($modules, require($filename));
  15. }
  16. // 服务组件
  17. $services = [];
  18. foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
  19. $services = array_merge($services, require($filename));
  20. }
  21. $components = [
  22. 'store' => [
  23. 'class' => '\common\local\local_components\Store',
  24. ],
  25. ];
  26. return [
  27. 'modules' => $modules,
  28. 'services' => $services,
  29. 'components' => $components,
  30. ];