mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 20:15:34 +00:00
* Fix 64-bit default numeric enum values in typescript If you had a default value that wasn't a valid enum value (e.g., a zero if you used a bit_flag setting, like you get with AdvancedFeatures in reflection.fbs), we weren't using BigInt. * Run generate_code.py * [DART] Handle deprecated fields & invalid enum defaults * Update .NET test
26 lines
529 B
PHP
26 lines
529 B
PHP
<?php
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
namespace MyGame\Example;
|
|
|
|
class LongEnum
|
|
{
|
|
const LongOne = 2;
|
|
const LongTwo = 4;
|
|
const LongBig = 1099511627776;
|
|
|
|
private static $names = array(
|
|
LongEnum::LongOne=>"LongOne",
|
|
LongEnum::LongTwo=>"LongTwo",
|
|
LongEnum::LongBig=>"LongBig",
|
|
);
|
|
|
|
public static function Name($e)
|
|
{
|
|
if (!isset(self::$names[$e])) {
|
|
throw new \Exception();
|
|
}
|
|
return self::$names[$e];
|
|
}
|
|
}
|