BaseAddonConfig.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. namespace common\components;
  3. /**
  4. * Class BaseAddonConfig
  5. * @package common\components
  6. * @author qimall
  7. */
  8. class BaseAddonConfig
  9. {
  10. /**
  11. * 基础信息
  12. *
  13. * @var array
  14. */
  15. public $info = [];
  16. /**
  17. * 应用配置
  18. *
  19. * 例如:菜单设置/权限设置/快捷入口
  20. *
  21. * @var array
  22. */
  23. public $appsConfig = [
  24. 'backend' => 'common/config/backend.php',
  25. 'frontend' => 'common/config/frontend.php',
  26. 'merchant' => 'common/config/merchant.php',
  27. 'merapi' => 'common/config/merapi.php',
  28. 'html5' => 'common/config/html5.php',
  29. 'api' => 'common/config/api.php',
  30. 'oauth2' => 'common/config/oauth2.php',
  31. ];
  32. /**
  33. * 引导文件
  34. *
  35. * 设置后系统会在执行插件控制器前执行
  36. *
  37. * @var string
  38. */
  39. public $bootstrap = '';
  40. /**
  41. * 服务层
  42. *
  43. * 设置后系统会自动注册
  44. *
  45. * 调用方式
  46. *
  47. * Yii::$app->插件名称 + Services
  48. *
  49. * 例如
  50. *
  51. * Yii::$app->tinyShopServices;
  52. *
  53. * @var string
  54. */
  55. public $service = '';
  56. /**
  57. * 控制台
  58. *
  59. * @var array
  60. */
  61. public $console = [
  62. // '* * * * *' => './yii addons/test/test',
  63. ];
  64. /**
  65. * 参数配置开启
  66. *
  67. * @var bool
  68. */
  69. public $isSetting = false;
  70. /**
  71. * 规则管理开启
  72. *
  73. * @var bool
  74. */
  75. public $isRule = false;
  76. /**
  77. * 商户路由映射
  78. *
  79. * 开启后无需再去商户应用端去开发程序,直接映射后台应用的控制器方法过去,菜单权限还需要单独配置
  80. *
  81. * @var bool
  82. */
  83. public $isMerchantRouteMap = false;
  84. /**
  85. * 类别
  86. *
  87. * @var string
  88. * [
  89. * 'plug' => "功能插件",
  90. * 'business' => "主要业务",
  91. * 'customer' => "客户关系",
  92. * 'activity' => "营销及活动",
  93. * 'services' => "常用服务及工具",
  94. * 'biz' => "行业解决方案",
  95. * 'h5game' => "H5游戏",
  96. * 'other' => "其他",
  97. * ]
  98. */
  99. public $group = 'plug';
  100. /**
  101. * 微信接收消息类别
  102. *
  103. * @var array
  104. * 例如 : ['image','voice','video','shortvideo']
  105. */
  106. public $wechatMessage = [];
  107. /**
  108. * 即时通讯可用控制器
  109. *
  110. * @var array
  111. */
  112. public $webSocket = [];
  113. /**
  114. * 保存在当前模块的根目录下面
  115. *
  116. * 例如 $install = 'Install';
  117. * 安装类
  118. * @var string
  119. */
  120. public $install = 'Install';
  121. /**
  122. * 卸载SQL类
  123. *
  124. * @var string
  125. */
  126. public $uninstall = 'UnInstall';
  127. /**
  128. * 更新SQL类
  129. *
  130. * @var string
  131. */
  132. public $upgrade = 'Upgrade';
  133. }