1 <?php 2 // automatically generated by the FlatBuffers compiler, do not modify 3 4 namespace MyGame\Example; 5 6 class Color 7 { 8 const Red = 1; 9 const Green = 2; 10 const Blue = 8; 11 12 private static $names = array( 13 "Red", 14 "Green", 15 "Blue", 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 } 26