123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: mail.proto
- /**
- * Protobuf type <code>OptMailType</code>
- */
- class OptMailType
- {
- /**
- * Generated from protobuf enum <code>ROLE_TYPE_UNKNOWN = 0;</code>
- */
- const ROLE_TYPE_UNKNOWN = 0;
- /**
- * 查看
- *
- * Generated from protobuf enum <code>CHECK = 1;</code>
- */
- const CHECK = 1;
- /**
- *领取
- *
- * Generated from protobuf enum <code>RECEIVE = 2;</code>
- */
- const RECEIVE = 2;
- /**
- *删除
- *
- * Generated from protobuf enum <code>DELETE = 3;</code>
- */
- const DELETE = 3;
- private static $valueToName = [
- self::ROLE_TYPE_UNKNOWN => 'ROLE_TYPE_UNKNOWN',
- self::CHECK => 'CHECK',
- self::RECEIVE => 'RECEIVE',
- self::DELETE => 'DELETE',
- ];
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
- }
|