Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame^] | 1 | <?php |
| 2 | // automatically generated by the FlatBuffers compiler, do not modify |
| 3 | |
| 4 | namespace MyGame\Example; |
| 5 | |
| 6 | use \Google\FlatBuffers\Struct; |
| 7 | use \Google\FlatBuffers\Table; |
| 8 | use \Google\FlatBuffers\ByteBuffer; |
| 9 | use \Google\FlatBuffers\FlatBufferBuilder; |
| 10 | |
| 11 | class Test extends Struct |
| 12 | { |
| 13 | /** |
| 14 | * @param int $_i offset |
| 15 | * @param ByteBuffer $_bb |
| 16 | * @return Test |
| 17 | **/ |
| 18 | public function init($_i, ByteBuffer $_bb) |
| 19 | { |
| 20 | $this->bb_pos = $_i; |
| 21 | $this->bb = $_bb; |
| 22 | return $this; |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * @return short |
| 27 | */ |
| 28 | public function GetA() |
| 29 | { |
| 30 | return $this->bb->getShort($this->bb_pos + 0); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * @return sbyte |
| 35 | */ |
| 36 | public function GetB() |
| 37 | { |
| 38 | return $this->bb->getSbyte($this->bb_pos + 2); |
| 39 | } |
| 40 | |
| 41 | |
| 42 | /** |
| 43 | * @return int offset |
| 44 | */ |
| 45 | public static function createTest(FlatBufferBuilder $builder, $a, $b) |
| 46 | { |
| 47 | $builder->prep(2, 4); |
| 48 | $builder->pad(1); |
| 49 | $builder->putSbyte($b); |
| 50 | $builder->putShort($a); |
| 51 | return $builder->offset(); |
| 52 | } |
| 53 | } |