fecshop_local.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. // 组件
  22. $components = [];
  23. // param
  24. $params = [];
  25. /**
  26. * Yii框架的class rewrite重写,这个一般不用,您可以通过这个重写基本上任何的class,但是这种方式是替换,重写的class无法继承原来的class,因此是替换的方式重写
  27. * Yii framework class rewrite: 文档:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#7yii2classclassmapfecmall
  28. */
  29. $yiiClassMap = [
  30. // 下面是一个重写的格式例子
  31. // 'fecshop\app\apphtml5\helper\test\My' => '@apphtml5/helper/My.php'
  32. ];
  33. /**
  34. * Fecmall model 和 block 重写,可以在RewriteMap中配置
  35. * 文档地址:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#8rewritemapblock-model
  36. */
  37. $fecRewriteMap = [
  38. // 下面是一个重写的格式例子
  39. // '\fecshop\app\appfront\modules\Cms\block\home\Index' => '\fectfurnilife\appfront\modules\Cms\block\home\Index',
  40. ];
  41. return [
  42. 'modules' => $modules,
  43. 'services' => $services,
  44. 'components' => $components,
  45. 'params' => $params,
  46. 'yiiClassMap' => $yiiClassMap,
  47. 'fecRewriteMap' => $fecRewriteMap,
  48. ];