UserShareEnum.php 573 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\common\Enum;
  3. /**
  4. * 全局状态枚举
  5. */
  6. class UserShareEnum
  7. {
  8. const FROM_FORWARD = 'forward';
  9. const FROM_POSTER = 'poster';
  10. const FROM_LINK = 'link';
  11. public static function getFromList()
  12. {
  13. return [
  14. self::FROM_FORWARD => '直接转发',
  15. self::FROM_POSTER => '识别海报',
  16. self::FROM_LINK => '分享链接',
  17. ];
  18. }
  19. public static function getFromText($from)
  20. {
  21. return self::getFromList()[$from] ?? '未知';
  22. }
  23. public static function getFromList()
  24. }