James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 1 | <?php |
| 2 | // automatically generated by the FlatBuffers compiler, do not modify |
| 3 | |
| 4 | namespace MyGame\Example; |
| 5 | |
| 6 | class LongEnum |
| 7 | { |
| 8 | const LongOne = 2; |
| 9 | const LongTwo = 4; |
| 10 | const LongBig = 1099511627776; |
| 11 | |
| 12 | private static $names = array( |
| 13 | LongEnum::LongOne=>"LongOne", |
| 14 | LongEnum::LongTwo=>"LongTwo", |
| 15 | LongEnum::LongBig=>"LongBig", |
| 16 | ); |
| 17 | |
| 18 | public static function Name($e) |
| 19 | { |
| 20 | if (!isset(self::$names[$e])) { |
| 21 | throw new \Exception(); |
| 22 | } |
| 23 | return self::$names[$e]; |
| 24 | } |
| 25 | } |