blob: 3f05c43c05ff5cee4f1c32c970942a3f4af36c47 [file] [log] [blame]
Austin Schuh272c6132020-11-14 16:37:52 -08001<?php
2// automatically generated by the FlatBuffers compiler, do not modify
3
4namespace MyGame\Example;
5
6class Race
7{
8 const None = -1;
9 const Human = 0;
10 const Dwarf = 1;
11 const Elf = 2;
12
13 private static $names = array(
14 Race::None=>"None",
15 Race::Human=>"Human",
16 Race::Dwarf=>"Dwarf",
17 Race::Elf=>"Elf",
18 );
19
20 public static function Name($e)
21 {
22 if (!isset(self::$names[$e])) {
23 throw new \Exception();
24 }
25 return self::$names[$e];
26 }
27}