BaseAddonConfig.php 2.6 KB

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