...

Text file src/github.com/google/flatbuffers/tests/MyGame/Example/Color.php

Documentation: github.com/google/flatbuffers/tests/MyGame/Example

     1<?php
     2// automatically generated by the FlatBuffers compiler, do not modify
     3
     4namespace MyGame\Example;
     5
     6/// Composite components of Monster color.
     7class Color
     8{
     9    const Red = 1;
    10    /// \brief color Green
    11    /// Green is bit_flag with value (1u << 1)
    12    const Green = 2;
    13    /// \brief color Blue (1u << 3)
    14    const Blue = 8;
    15
    16    private static $names = array(
    17        Color::Red=>"Red",
    18        Color::Green=>"Green",
    19        Color::Blue=>"Blue",
    20    );
    21
    22    public static function Name($e)
    23    {
    24        if (!isset(self::$names[$e])) {
    25            throw new \Exception();
    26        }
    27        return self::$names[$e];
    28    }
    29}

View as plain text