MemberGift.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace core\dict;
  12. class MemberGift extends BaseDict
  13. {
  14. /**
  15. * 加载事件
  16. * @param array $data
  17. * @return array|mixed
  18. */
  19. public function load(array $data = [])
  20. {
  21. $addons = $this->getLocalAddons();
  22. $account_change_type_files = [];
  23. $system_change_type_file = $this->getDictPath() . "member" . DIRECTORY_SEPARATOR . "gift.php";
  24. if (is_file($system_change_type_file)) {
  25. $account_change_type_files[] = $system_change_type_file;
  26. }
  27. foreach ($addons as $v) {
  28. $addon_change_type_file = $this->getAddonDictPath($v) . "member" . DIRECTORY_SEPARATOR . "gift.php";
  29. if (is_file($addon_change_type_file)) {
  30. $account_change_type_files[] = $addon_change_type_file;
  31. }
  32. }
  33. $account_change_type_datas = $this->loadFiles($account_change_type_files);
  34. $account_change_type_array = [];
  35. foreach ($account_change_type_datas as $account_change_type_data) {
  36. $account_change_type_array = empty($account_change_type_array) ? $account_change_type_data : array_merge2($account_change_type_array, $account_change_type_data);
  37. }
  38. return $account_change_type_array;
  39. }
  40. }