fecshop_local.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. // 本文件在app/web/index.php 处引入。
  3. // fecshop的核心模块
  4. $modules = [];
  5. foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
  6. $modules = array_merge($modules, require($filename));
  7. }
  8. // services
  9. $services = [];
  10. foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
  11. $services = array_merge($services, require($filename));
  12. }
  13. // 组件
  14. $components = [];
  15. // param
  16. $params = [];
  17. /**
  18. * Yii框架的class rewrite重写,这个一般不用,您可以通过这个重写基本上任何的class,但是这种方式是替换,重写的class无法继承原来的class,因此是替换的方式重写
  19. * Yii framework class rewrite: 文档:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#7yii2classclassmapfecmall
  20. */
  21. $yiiClassMap = [
  22. // 下面是一个重写的格式例子
  23. // 'fecshop\app\apphtml5\helper\test\My' => '@apphtml5/helper/My.php'
  24. ];
  25. /**
  26. * Fecmall model 和 block 重写,可以在RewriteMap中配置
  27. * 文档地址:http://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecmall-rewrite-func.html#8rewritemapblock-model
  28. */
  29. $fecRewriteMap = [
  30. // 下面是一个重写的格式例子
  31. // '\fecshop\app\appfront\modules\Cms\block\home\Index' => '\fectfurnilife\appfront\modules\Cms\block\home\Index',
  32. ];
  33. return [
  34. 'modules' => $modules,
  35. 'services' => $services,
  36. 'components' => $components,
  37. 'params' => $params,
  38. 'yiiClassMap' => $yiiClassMap,
  39. 'fecRewriteMap' => $fecRewriteMap,
  40. ];