SEED_STATUS.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: proto/game.proto
  4. namespace Uraus\Kku\Common;
  5. use UnexpectedValueException;
  6. /**
  7. * 种子阶段(生长周期)
  8. *
  9. * Protobuf type <code>uraus.kku.Common.SEED_STATUS</code>
  10. */
  11. class SEED_STATUS
  12. {
  13. /**
  14. * 默认
  15. *
  16. * Generated from protobuf enum <code>SEED_STATUS_NODE = 0;</code>
  17. */
  18. const SEED_STATUS_NODE = 0;
  19. /**
  20. * 种子期
  21. *
  22. * Generated from protobuf enum <code>SEEN_STAGE = 1;</code>
  23. */
  24. const SEEN_STAGE = 1;
  25. /**
  26. * 发芽
  27. *
  28. * Generated from protobuf enum <code>SPROUTING_STAGE = 20;</code>
  29. */
  30. const SPROUTING_STAGE = 20;
  31. /**
  32. * 成长
  33. *
  34. * Generated from protobuf enum <code>GROWING_STAGE = 30;</code>
  35. */
  36. const GROWING_STAGE = 30;
  37. /**
  38. * 成熟
  39. *
  40. * Generated from protobuf enum <code>MATURE_STAGE = 40;</code>
  41. */
  42. const MATURE_STAGE = 40;
  43. /**
  44. * 枯萎
  45. *
  46. * Generated from protobuf enum <code>WITHERED_STAGE = 50;</code>
  47. */
  48. const WITHERED_STAGE = 50;
  49. private static $valueToName = [
  50. self::SEED_STATUS_NODE => 'SEED_STATUS_NODE',
  51. self::SEEN_STAGE => 'SEEN_STAGE',
  52. self::SPROUTING_STAGE => 'SPROUTING_STAGE',
  53. self::GROWING_STAGE => 'GROWING_STAGE',
  54. self::MATURE_STAGE => 'MATURE_STAGE',
  55. self::WITHERED_STAGE => 'WITHERED_STAGE',
  56. ];
  57. public static function name($value)
  58. {
  59. if (!isset(self::$valueToName[$value])) {
  60. throw new UnexpectedValueException(sprintf(
  61. 'Enum %s has no name defined for value %s', __CLASS__, $value));
  62. }
  63. return self::$valueToName[$value];
  64. }
  65. public static function value($name)
  66. {
  67. $const = __CLASS__ . '::' . strtoupper($name);
  68. if (!defined($const)) {
  69. throw new UnexpectedValueException(sprintf(
  70. 'Enum %s has no value defined for name %s', __CLASS__, $name));
  71. }
  72. return constant($const);
  73. }
  74. }
  75. // Adding a class alias for backwards compatibility with the previous class name.
  76. class_alias(SEED_STATUS::class, \Uraus\Kku\Common_SEED_STATUS::class);