• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?php
2// automatically generated by the FlatBuffers compiler, do not modify
3
4namespace MyGame\Example;
5
6use \Google\FlatBuffers\Struct;
7use \Google\FlatBuffers\Table;
8use \Google\FlatBuffers\ByteBuffer;
9use \Google\FlatBuffers\FlatBufferBuilder;
10
11/// an example documentation comment: "monster object"
12class Monster extends Table
13{
14    /**
15     * @param ByteBuffer $bb
16     * @return Monster
17     */
18    public static function getRootAsMonster(ByteBuffer $bb)
19    {
20        $obj = new Monster();
21        return ($obj->init($bb->getInt($bb->getPosition()) + $bb->getPosition(), $bb));
22    }
23
24    public static function MonsterIdentifier()
25    {
26        return "MONS";
27    }
28
29    public static function MonsterBufferHasIdentifier(ByteBuffer $buf)
30    {
31        return self::__has_identifier($buf, self::MonsterIdentifier());
32    }
33
34    public static function MonsterExtension()
35    {
36        return "mon";
37    }
38
39    /**
40     * @param int $_i offset
41     * @param ByteBuffer $_bb
42     * @return Monster
43     **/
44    public function init($_i, ByteBuffer $_bb)
45    {
46        $this->bb_pos = $_i;
47        $this->bb = $_bb;
48        return $this;
49    }
50
51    public function getPos()
52    {
53        $obj = new Vec3();
54        $o = $this->__offset(4);
55        return $o != 0 ? $obj->init($o + $this->bb_pos, $this->bb) : 0;
56    }
57
58    /**
59     * @return short
60     */
61    public function getMana()
62    {
63        $o = $this->__offset(6);
64        return $o != 0 ? $this->bb->getShort($o + $this->bb_pos) : 150;
65    }
66
67    /**
68     * @return short
69     */
70    public function getHp()
71    {
72        $o = $this->__offset(8);
73        return $o != 0 ? $this->bb->getShort($o + $this->bb_pos) : 100;
74    }
75
76    public function getName()
77    {
78        $o = $this->__offset(10);
79        return $o != 0 ? $this->__string($o + $this->bb_pos) : null;
80    }
81
82    /**
83     * @param int offset
84     * @return byte
85     */
86    public function getInventory($j)
87    {
88        $o = $this->__offset(14);
89        return $o != 0 ? $this->bb->getByte($this->__vector($o) + $j * 1) : 0;
90    }
91
92    /**
93     * @return int
94     */
95    public function getInventoryLength()
96    {
97        $o = $this->__offset(14);
98        return $o != 0 ? $this->__vector_len($o) : 0;
99    }
100
101    /**
102     * @return string
103     */
104    public function getInventoryBytes()
105    {
106        return $this->__vector_as_bytes(14);
107    }
108
109    /**
110     * @return byte
111     */
112    public function getColor()
113    {
114        $o = $this->__offset(16);
115        return $o != 0 ? $this->bb->getByte($o + $this->bb_pos) : \MyGame\Example\Color::Blue;
116    }
117
118    /**
119     * @return byte
120     */
121    public function getTestType()
122    {
123        $o = $this->__offset(18);
124        return $o != 0 ? $this->bb->getByte($o + $this->bb_pos) : \MyGame\Example\Any::NONE;
125    }
126
127    /**
128     * @returnint
129     */
130    public function getTest($obj)
131    {
132        $o = $this->__offset(20);
133        return $o != 0 ? $this->__union($obj, $o) : null;
134    }
135
136    /**
137     * @returnVectorOffset
138     */
139    public function getTest4($j)
140    {
141        $o = $this->__offset(22);
142        $obj = new Test();
143        return $o != 0 ? $obj->init($this->__vector($o) + $j *4, $this->bb) : null;
144    }
145
146    /**
147     * @return int
148     */
149    public function getTest4Length()
150    {
151        $o = $this->__offset(22);
152        return $o != 0 ? $this->__vector_len($o) : 0;
153    }
154
155    /**
156     * @param int offset
157     * @return string
158     */
159    public function getTestarrayofstring($j)
160    {
161        $o = $this->__offset(24);
162        return $o != 0 ? $this->__string($this->__vector($o) + $j * 4) : 0;
163    }
164
165    /**
166     * @return int
167     */
168    public function getTestarrayofstringLength()
169    {
170        $o = $this->__offset(24);
171        return $o != 0 ? $this->__vector_len($o) : 0;
172    }
173
174    /// an example documentation comment: this will end up in the generated code
175    /// multiline too
176    /**
177     * @returnVectorOffset
178     */
179    public function getTestarrayoftables($j)
180    {
181        $o = $this->__offset(26);
182        $obj = new Monster();
183        return $o != 0 ? $obj->init($this->__indirect($this->__vector($o) + $j * 4), $this->bb) : null;
184    }
185
186    /**
187     * @return int
188     */
189    public function getTestarrayoftablesLength()
190    {
191        $o = $this->__offset(26);
192        return $o != 0 ? $this->__vector_len($o) : 0;
193    }
194
195    public function getEnemy()
196    {
197        $obj = new Monster();
198        $o = $this->__offset(28);
199        return $o != 0 ? $obj->init($this->__indirect($o + $this->bb_pos), $this->bb) : 0;
200    }
201
202    /**
203     * @param int offset
204     * @return byte
205     */
206    public function getTestnestedflatbuffer($j)
207    {
208        $o = $this->__offset(30);
209        return $o != 0 ? $this->bb->getByte($this->__vector($o) + $j * 1) : 0;
210    }
211
212    /**
213     * @return int
214     */
215    public function getTestnestedflatbufferLength()
216    {
217        $o = $this->__offset(30);
218        return $o != 0 ? $this->__vector_len($o) : 0;
219    }
220
221    /**
222     * @return string
223     */
224    public function getTestnestedflatbufferBytes()
225    {
226        return $this->__vector_as_bytes(30);
227    }
228
229    public function getTestempty()
230    {
231        $obj = new Stat();
232        $o = $this->__offset(32);
233        return $o != 0 ? $obj->init($this->__indirect($o + $this->bb_pos), $this->bb) : 0;
234    }
235
236    /**
237     * @return bool
238     */
239    public function getTestbool()
240    {
241        $o = $this->__offset(34);
242        return $o != 0 ? $this->bb->getBool($o + $this->bb_pos) : false;
243    }
244
245    /**
246     * @return int
247     */
248    public function getTesthashs32Fnv1()
249    {
250        $o = $this->__offset(36);
251        return $o != 0 ? $this->bb->getInt($o + $this->bb_pos) : 0;
252    }
253
254    /**
255     * @return uint
256     */
257    public function getTesthashu32Fnv1()
258    {
259        $o = $this->__offset(38);
260        return $o != 0 ? $this->bb->getUint($o + $this->bb_pos) : 0;
261    }
262
263    /**
264     * @return long
265     */
266    public function getTesthashs64Fnv1()
267    {
268        $o = $this->__offset(40);
269        return $o != 0 ? $this->bb->getLong($o + $this->bb_pos) : 0;
270    }
271
272    /**
273     * @return ulong
274     */
275    public function getTesthashu64Fnv1()
276    {
277        $o = $this->__offset(42);
278        return $o != 0 ? $this->bb->getUlong($o + $this->bb_pos) : 0;
279    }
280
281    /**
282     * @return int
283     */
284    public function getTesthashs32Fnv1a()
285    {
286        $o = $this->__offset(44);
287        return $o != 0 ? $this->bb->getInt($o + $this->bb_pos) : 0;
288    }
289
290    /**
291     * @return uint
292     */
293    public function getTesthashu32Fnv1a()
294    {
295        $o = $this->__offset(46);
296        return $o != 0 ? $this->bb->getUint($o + $this->bb_pos) : 0;
297    }
298
299    /**
300     * @return long
301     */
302    public function getTesthashs64Fnv1a()
303    {
304        $o = $this->__offset(48);
305        return $o != 0 ? $this->bb->getLong($o + $this->bb_pos) : 0;
306    }
307
308    /**
309     * @return ulong
310     */
311    public function getTesthashu64Fnv1a()
312    {
313        $o = $this->__offset(50);
314        return $o != 0 ? $this->bb->getUlong($o + $this->bb_pos) : 0;
315    }
316
317    /**
318     * @param int offset
319     * @return bool
320     */
321    public function getTestarrayofbools($j)
322    {
323        $o = $this->__offset(52);
324        return $o != 0 ? $this->bb->getBool($this->__vector($o) + $j * 1) : 0;
325    }
326
327    /**
328     * @return int
329     */
330    public function getTestarrayofboolsLength()
331    {
332        $o = $this->__offset(52);
333        return $o != 0 ? $this->__vector_len($o) : 0;
334    }
335
336    /**
337     * @return float
338     */
339    public function getTestf()
340    {
341        $o = $this->__offset(54);
342        return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : 3.14159;
343    }
344
345    /**
346     * @return float
347     */
348    public function getTestf2()
349    {
350        $o = $this->__offset(56);
351        return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : 3.0;
352    }
353
354    /**
355     * @return float
356     */
357    public function getTestf3()
358    {
359        $o = $this->__offset(58);
360        return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : 0.0;
361    }
362
363    /**
364     * @param int offset
365     * @return string
366     */
367    public function getTestarrayofstring2($j)
368    {
369        $o = $this->__offset(60);
370        return $o != 0 ? $this->__string($this->__vector($o) + $j * 4) : 0;
371    }
372
373    /**
374     * @return int
375     */
376    public function getTestarrayofstring2Length()
377    {
378        $o = $this->__offset(60);
379        return $o != 0 ? $this->__vector_len($o) : 0;
380    }
381
382    /**
383     * @returnVectorOffset
384     */
385    public function getTestarrayofsortedstruct($j)
386    {
387        $o = $this->__offset(62);
388        $obj = new Ability();
389        return $o != 0 ? $obj->init($this->__vector($o) + $j *8, $this->bb) : null;
390    }
391
392    /**
393     * @return int
394     */
395    public function getTestarrayofsortedstructLength()
396    {
397        $o = $this->__offset(62);
398        return $o != 0 ? $this->__vector_len($o) : 0;
399    }
400
401    /**
402     * @param int offset
403     * @return byte
404     */
405    public function getFlex($j)
406    {
407        $o = $this->__offset(64);
408        return $o != 0 ? $this->bb->getByte($this->__vector($o) + $j * 1) : 0;
409    }
410
411    /**
412     * @return int
413     */
414    public function getFlexLength()
415    {
416        $o = $this->__offset(64);
417        return $o != 0 ? $this->__vector_len($o) : 0;
418    }
419
420    /**
421     * @return string
422     */
423    public function getFlexBytes()
424    {
425        return $this->__vector_as_bytes(64);
426    }
427
428    /**
429     * @returnVectorOffset
430     */
431    public function getTest5($j)
432    {
433        $o = $this->__offset(66);
434        $obj = new Test();
435        return $o != 0 ? $obj->init($this->__vector($o) + $j *4, $this->bb) : null;
436    }
437
438    /**
439     * @return int
440     */
441    public function getTest5Length()
442    {
443        $o = $this->__offset(66);
444        return $o != 0 ? $this->__vector_len($o) : 0;
445    }
446
447    /**
448     * @param int offset
449     * @return long
450     */
451    public function getVectorOfLongs($j)
452    {
453        $o = $this->__offset(68);
454        return $o != 0 ? $this->bb->getLong($this->__vector($o) + $j * 8) : 0;
455    }
456
457    /**
458     * @return int
459     */
460    public function getVectorOfLongsLength()
461    {
462        $o = $this->__offset(68);
463        return $o != 0 ? $this->__vector_len($o) : 0;
464    }
465
466    /**
467     * @param int offset
468     * @return double
469     */
470    public function getVectorOfDoubles($j)
471    {
472        $o = $this->__offset(70);
473        return $o != 0 ? $this->bb->getDouble($this->__vector($o) + $j * 8) : 0;
474    }
475
476    /**
477     * @return int
478     */
479    public function getVectorOfDoublesLength()
480    {
481        $o = $this->__offset(70);
482        return $o != 0 ? $this->__vector_len($o) : 0;
483    }
484
485    public function getParentNamespaceTest()
486    {
487        $obj = new InParentNamespace();
488        $o = $this->__offset(72);
489        return $o != 0 ? $obj->init($this->__indirect($o + $this->bb_pos), $this->bb) : 0;
490    }
491
492    /**
493     * @returnVectorOffset
494     */
495    public function getVectorOfReferrables($j)
496    {
497        $o = $this->__offset(74);
498        $obj = new Referrable();
499        return $o != 0 ? $obj->init($this->__indirect($this->__vector($o) + $j * 4), $this->bb) : null;
500    }
501
502    /**
503     * @return int
504     */
505    public function getVectorOfReferrablesLength()
506    {
507        $o = $this->__offset(74);
508        return $o != 0 ? $this->__vector_len($o) : 0;
509    }
510
511    /**
512     * @return ulong
513     */
514    public function getSingleWeakReference()
515    {
516        $o = $this->__offset(76);
517        return $o != 0 ? $this->bb->getUlong($o + $this->bb_pos) : 0;
518    }
519
520    /**
521     * @param int offset
522     * @return ulong
523     */
524    public function getVectorOfWeakReferences($j)
525    {
526        $o = $this->__offset(78);
527        return $o != 0 ? $this->bb->getUlong($this->__vector($o) + $j * 8) : 0;
528    }
529
530    /**
531     * @return int
532     */
533    public function getVectorOfWeakReferencesLength()
534    {
535        $o = $this->__offset(78);
536        return $o != 0 ? $this->__vector_len($o) : 0;
537    }
538
539    /**
540     * @returnVectorOffset
541     */
542    public function getVectorOfStrongReferrables($j)
543    {
544        $o = $this->__offset(80);
545        $obj = new Referrable();
546        return $o != 0 ? $obj->init($this->__indirect($this->__vector($o) + $j * 4), $this->bb) : null;
547    }
548
549    /**
550     * @return int
551     */
552    public function getVectorOfStrongReferrablesLength()
553    {
554        $o = $this->__offset(80);
555        return $o != 0 ? $this->__vector_len($o) : 0;
556    }
557
558    /**
559     * @return ulong
560     */
561    public function getCoOwningReference()
562    {
563        $o = $this->__offset(82);
564        return $o != 0 ? $this->bb->getUlong($o + $this->bb_pos) : 0;
565    }
566
567    /**
568     * @param int offset
569     * @return ulong
570     */
571    public function getVectorOfCoOwningReferences($j)
572    {
573        $o = $this->__offset(84);
574        return $o != 0 ? $this->bb->getUlong($this->__vector($o) + $j * 8) : 0;
575    }
576
577    /**
578     * @return int
579     */
580    public function getVectorOfCoOwningReferencesLength()
581    {
582        $o = $this->__offset(84);
583        return $o != 0 ? $this->__vector_len($o) : 0;
584    }
585
586    /**
587     * @return ulong
588     */
589    public function getNonOwningReference()
590    {
591        $o = $this->__offset(86);
592        return $o != 0 ? $this->bb->getUlong($o + $this->bb_pos) : 0;
593    }
594
595    /**
596     * @param int offset
597     * @return ulong
598     */
599    public function getVectorOfNonOwningReferences($j)
600    {
601        $o = $this->__offset(88);
602        return $o != 0 ? $this->bb->getUlong($this->__vector($o) + $j * 8) : 0;
603    }
604
605    /**
606     * @return int
607     */
608    public function getVectorOfNonOwningReferencesLength()
609    {
610        $o = $this->__offset(88);
611        return $o != 0 ? $this->__vector_len($o) : 0;
612    }
613
614    /**
615     * @return byte
616     */
617    public function getAnyUniqueType()
618    {
619        $o = $this->__offset(90);
620        return $o != 0 ? $this->bb->getByte($o + $this->bb_pos) : \MyGame\Example\AnyUniqueAliases::NONE;
621    }
622
623    /**
624     * @returnint
625     */
626    public function getAnyUnique($obj)
627    {
628        $o = $this->__offset(92);
629        return $o != 0 ? $this->__union($obj, $o) : null;
630    }
631
632    /**
633     * @return byte
634     */
635    public function getAnyAmbiguousType()
636    {
637        $o = $this->__offset(94);
638        return $o != 0 ? $this->bb->getByte($o + $this->bb_pos) : \MyGame\Example\AnyAmbiguousAliases::NONE;
639    }
640
641    /**
642     * @returnint
643     */
644    public function getAnyAmbiguous($obj)
645    {
646        $o = $this->__offset(96);
647        return $o != 0 ? $this->__union($obj, $o) : null;
648    }
649
650    /**
651     * @param int offset
652     * @return byte
653     */
654    public function getVectorOfEnums($j)
655    {
656        $o = $this->__offset(98);
657        return $o != 0 ? $this->bb->getByte($this->__vector($o) + $j * 1) : 0;
658    }
659
660    /**
661     * @return int
662     */
663    public function getVectorOfEnumsLength()
664    {
665        $o = $this->__offset(98);
666        return $o != 0 ? $this->__vector_len($o) : 0;
667    }
668
669    /**
670     * @return string
671     */
672    public function getVectorOfEnumsBytes()
673    {
674        return $this->__vector_as_bytes(98);
675    }
676
677    /**
678     * @return sbyte
679     */
680    public function getSignedEnum()
681    {
682        $o = $this->__offset(100);
683        return $o != 0 ? $this->bb->getSbyte($o + $this->bb_pos) : \MyGame\Example\Race::None;
684    }
685
686    /**
687     * @param FlatBufferBuilder $builder
688     * @return void
689     */
690    public static function startMonster(FlatBufferBuilder $builder)
691    {
692        $builder->StartObject(49);
693    }
694
695    /**
696     * @param FlatBufferBuilder $builder
697     * @return Monster
698     */
699    public static function createMonster(FlatBufferBuilder $builder, $pos, $mana, $hp, $name, $inventory, $color, $test_type, $test, $test4, $testarrayofstring, $testarrayoftables, $enemy, $testnestedflatbuffer, $testempty, $testbool, $testhashs32_fnv1, $testhashu32_fnv1, $testhashs64_fnv1, $testhashu64_fnv1, $testhashs32_fnv1a, $testhashu32_fnv1a, $testhashs64_fnv1a, $testhashu64_fnv1a, $testarrayofbools, $testf, $testf2, $testf3, $testarrayofstring2, $testarrayofsortedstruct, $flex, $test5, $vector_of_longs, $vector_of_doubles, $parent_namespace_test, $vector_of_referrables, $single_weak_reference, $vector_of_weak_references, $vector_of_strong_referrables, $co_owning_reference, $vector_of_co_owning_references, $non_owning_reference, $vector_of_non_owning_references, $any_unique_type, $any_unique, $any_ambiguous_type, $any_ambiguous, $vector_of_enums, $signed_enum)
700    {
701        $builder->startObject(49);
702        self::addPos($builder, $pos);
703        self::addMana($builder, $mana);
704        self::addHp($builder, $hp);
705        self::addName($builder, $name);
706        self::addInventory($builder, $inventory);
707        self::addColor($builder, $color);
708        self::addTestType($builder, $test_type);
709        self::addTest($builder, $test);
710        self::addTest4($builder, $test4);
711        self::addTestarrayofstring($builder, $testarrayofstring);
712        self::addTestarrayoftables($builder, $testarrayoftables);
713        self::addEnemy($builder, $enemy);
714        self::addTestnestedflatbuffer($builder, $testnestedflatbuffer);
715        self::addTestempty($builder, $testempty);
716        self::addTestbool($builder, $testbool);
717        self::addTesthashs32Fnv1($builder, $testhashs32_fnv1);
718        self::addTesthashu32Fnv1($builder, $testhashu32_fnv1);
719        self::addTesthashs64Fnv1($builder, $testhashs64_fnv1);
720        self::addTesthashu64Fnv1($builder, $testhashu64_fnv1);
721        self::addTesthashs32Fnv1a($builder, $testhashs32_fnv1a);
722        self::addTesthashu32Fnv1a($builder, $testhashu32_fnv1a);
723        self::addTesthashs64Fnv1a($builder, $testhashs64_fnv1a);
724        self::addTesthashu64Fnv1a($builder, $testhashu64_fnv1a);
725        self::addTestarrayofbools($builder, $testarrayofbools);
726        self::addTestf($builder, $testf);
727        self::addTestf2($builder, $testf2);
728        self::addTestf3($builder, $testf3);
729        self::addTestarrayofstring2($builder, $testarrayofstring2);
730        self::addTestarrayofsortedstruct($builder, $testarrayofsortedstruct);
731        self::addFlex($builder, $flex);
732        self::addTest5($builder, $test5);
733        self::addVectorOfLongs($builder, $vector_of_longs);
734        self::addVectorOfDoubles($builder, $vector_of_doubles);
735        self::addParentNamespaceTest($builder, $parent_namespace_test);
736        self::addVectorOfReferrables($builder, $vector_of_referrables);
737        self::addSingleWeakReference($builder, $single_weak_reference);
738        self::addVectorOfWeakReferences($builder, $vector_of_weak_references);
739        self::addVectorOfStrongReferrables($builder, $vector_of_strong_referrables);
740        self::addCoOwningReference($builder, $co_owning_reference);
741        self::addVectorOfCoOwningReferences($builder, $vector_of_co_owning_references);
742        self::addNonOwningReference($builder, $non_owning_reference);
743        self::addVectorOfNonOwningReferences($builder, $vector_of_non_owning_references);
744        self::addAnyUniqueType($builder, $any_unique_type);
745        self::addAnyUnique($builder, $any_unique);
746        self::addAnyAmbiguousType($builder, $any_ambiguous_type);
747        self::addAnyAmbiguous($builder, $any_ambiguous);
748        self::addVectorOfEnums($builder, $vector_of_enums);
749        self::addSignedEnum($builder, $signed_enum);
750        $o = $builder->endObject();
751        $builder->required($o, 10);  // name
752        return $o;
753    }
754
755    /**
756     * @param FlatBufferBuilder $builder
757     * @param int
758     * @return void
759     */
760    public static function addPos(FlatBufferBuilder $builder, $pos)
761    {
762        $builder->addStructX(0, $pos, 0);
763    }
764
765    /**
766     * @param FlatBufferBuilder $builder
767     * @param short
768     * @return void
769     */
770    public static function addMana(FlatBufferBuilder $builder, $mana)
771    {
772        $builder->addShortX(1, $mana, 150);
773    }
774
775    /**
776     * @param FlatBufferBuilder $builder
777     * @param short
778     * @return void
779     */
780    public static function addHp(FlatBufferBuilder $builder, $hp)
781    {
782        $builder->addShortX(2, $hp, 100);
783    }
784
785    /**
786     * @param FlatBufferBuilder $builder
787     * @param StringOffset
788     * @return void
789     */
790    public static function addName(FlatBufferBuilder $builder, $name)
791    {
792        $builder->addOffsetX(3, $name, 0);
793    }
794
795    /**
796     * @param FlatBufferBuilder $builder
797     * @param VectorOffset
798     * @return void
799     */
800    public static function addInventory(FlatBufferBuilder $builder, $inventory)
801    {
802        $builder->addOffsetX(5, $inventory, 0);
803    }
804
805    /**
806     * @param FlatBufferBuilder $builder
807     * @param array offset array
808     * @return int vector offset
809     */
810    public static function createInventoryVector(FlatBufferBuilder $builder, array $data)
811    {
812        $builder->startVector(1, count($data), 1);
813        for ($i = count($data) - 1; $i >= 0; $i--) {
814            $builder->putByte($data[$i]);
815        }
816        return $builder->endVector();
817    }
818
819    /**
820     * @param FlatBufferBuilder $builder
821     * @param int $numElems
822     * @return void
823     */
824    public static function startInventoryVector(FlatBufferBuilder $builder, $numElems)
825    {
826        $builder->startVector(1, $numElems, 1);
827    }
828
829    /**
830     * @param FlatBufferBuilder $builder
831     * @param byte
832     * @return void
833     */
834    public static function addColor(FlatBufferBuilder $builder, $color)
835    {
836        $builder->addByteX(6, $color, 8);
837    }
838
839    /**
840     * @param FlatBufferBuilder $builder
841     * @param byte
842     * @return void
843     */
844    public static function addTestType(FlatBufferBuilder $builder, $testType)
845    {
846        $builder->addByteX(7, $testType, 0);
847    }
848
849    public static function addTest(FlatBufferBuilder $builder, $offset)
850    {
851        $builder->addOffsetX(8, $offset, 0);
852    }
853
854    /**
855     * @param FlatBufferBuilder $builder
856     * @param VectorOffset
857     * @return void
858     */
859    public static function addTest4(FlatBufferBuilder $builder, $test4)
860    {
861        $builder->addOffsetX(9, $test4, 0);
862    }
863
864    /**
865     * @param FlatBufferBuilder $builder
866     * @param array offset array
867     * @return int vector offset
868     */
869    public static function createTest4Vector(FlatBufferBuilder $builder, array $data)
870    {
871        $builder->startVector(4, count($data), 2);
872        for ($i = count($data) - 1; $i >= 0; $i--) {
873            $builder->putOffset($data[$i]);
874        }
875        return $builder->endVector();
876    }
877
878    /**
879     * @param FlatBufferBuilder $builder
880     * @param int $numElems
881     * @return void
882     */
883    public static function startTest4Vector(FlatBufferBuilder $builder, $numElems)
884    {
885        $builder->startVector(4, $numElems, 2);
886    }
887
888    /**
889     * @param FlatBufferBuilder $builder
890     * @param VectorOffset
891     * @return void
892     */
893    public static function addTestarrayofstring(FlatBufferBuilder $builder, $testarrayofstring)
894    {
895        $builder->addOffsetX(10, $testarrayofstring, 0);
896    }
897
898    /**
899     * @param FlatBufferBuilder $builder
900     * @param array offset array
901     * @return int vector offset
902     */
903    public static function createTestarrayofstringVector(FlatBufferBuilder $builder, array $data)
904    {
905        $builder->startVector(4, count($data), 4);
906        for ($i = count($data) - 1; $i >= 0; $i--) {
907            $builder->putOffset($data[$i]);
908        }
909        return $builder->endVector();
910    }
911
912    /**
913     * @param FlatBufferBuilder $builder
914     * @param int $numElems
915     * @return void
916     */
917    public static function startTestarrayofstringVector(FlatBufferBuilder $builder, $numElems)
918    {
919        $builder->startVector(4, $numElems, 4);
920    }
921
922    /**
923     * @param FlatBufferBuilder $builder
924     * @param VectorOffset
925     * @return void
926     */
927    public static function addTestarrayoftables(FlatBufferBuilder $builder, $testarrayoftables)
928    {
929        $builder->addOffsetX(11, $testarrayoftables, 0);
930    }
931
932    /**
933     * @param FlatBufferBuilder $builder
934     * @param array offset array
935     * @return int vector offset
936     */
937    public static function createTestarrayoftablesVector(FlatBufferBuilder $builder, array $data)
938    {
939        $builder->startVector(4, count($data), 4);
940        for ($i = count($data) - 1; $i >= 0; $i--) {
941            $builder->putOffset($data[$i]);
942        }
943        return $builder->endVector();
944    }
945
946    /**
947     * @param FlatBufferBuilder $builder
948     * @param int $numElems
949     * @return void
950     */
951    public static function startTestarrayoftablesVector(FlatBufferBuilder $builder, $numElems)
952    {
953        $builder->startVector(4, $numElems, 4);
954    }
955
956    /**
957     * @param FlatBufferBuilder $builder
958     * @param int
959     * @return void
960     */
961    public static function addEnemy(FlatBufferBuilder $builder, $enemy)
962    {
963        $builder->addOffsetX(12, $enemy, 0);
964    }
965
966    /**
967     * @param FlatBufferBuilder $builder
968     * @param VectorOffset
969     * @return void
970     */
971    public static function addTestnestedflatbuffer(FlatBufferBuilder $builder, $testnestedflatbuffer)
972    {
973        $builder->addOffsetX(13, $testnestedflatbuffer, 0);
974    }
975
976    /**
977     * @param FlatBufferBuilder $builder
978     * @param array offset array
979     * @return int vector offset
980     */
981    public static function createTestnestedflatbufferVector(FlatBufferBuilder $builder, array $data)
982    {
983        $builder->startVector(1, count($data), 1);
984        for ($i = count($data) - 1; $i >= 0; $i--) {
985            $builder->putByte($data[$i]);
986        }
987        return $builder->endVector();
988    }
989
990    /**
991     * @param FlatBufferBuilder $builder
992     * @param int $numElems
993     * @return void
994     */
995    public static function startTestnestedflatbufferVector(FlatBufferBuilder $builder, $numElems)
996    {
997        $builder->startVector(1, $numElems, 1);
998    }
999
1000    /**
1001     * @param FlatBufferBuilder $builder
1002     * @param int
1003     * @return void
1004     */
1005    public static function addTestempty(FlatBufferBuilder $builder, $testempty)
1006    {
1007        $builder->addOffsetX(14, $testempty, 0);
1008    }
1009
1010    /**
1011     * @param FlatBufferBuilder $builder
1012     * @param bool
1013     * @return void
1014     */
1015    public static function addTestbool(FlatBufferBuilder $builder, $testbool)
1016    {
1017        $builder->addBoolX(15, $testbool, false);
1018    }
1019
1020    /**
1021     * @param FlatBufferBuilder $builder
1022     * @param int
1023     * @return void
1024     */
1025    public static function addTesthashs32Fnv1(FlatBufferBuilder $builder, $testhashs32Fnv1)
1026    {
1027        $builder->addIntX(16, $testhashs32Fnv1, 0);
1028    }
1029
1030    /**
1031     * @param FlatBufferBuilder $builder
1032     * @param uint
1033     * @return void
1034     */
1035    public static function addTesthashu32Fnv1(FlatBufferBuilder $builder, $testhashu32Fnv1)
1036    {
1037        $builder->addUintX(17, $testhashu32Fnv1, 0);
1038    }
1039
1040    /**
1041     * @param FlatBufferBuilder $builder
1042     * @param long
1043     * @return void
1044     */
1045    public static function addTesthashs64Fnv1(FlatBufferBuilder $builder, $testhashs64Fnv1)
1046    {
1047        $builder->addLongX(18, $testhashs64Fnv1, 0);
1048    }
1049
1050    /**
1051     * @param FlatBufferBuilder $builder
1052     * @param ulong
1053     * @return void
1054     */
1055    public static function addTesthashu64Fnv1(FlatBufferBuilder $builder, $testhashu64Fnv1)
1056    {
1057        $builder->addUlongX(19, $testhashu64Fnv1, 0);
1058    }
1059
1060    /**
1061     * @param FlatBufferBuilder $builder
1062     * @param int
1063     * @return void
1064     */
1065    public static function addTesthashs32Fnv1a(FlatBufferBuilder $builder, $testhashs32Fnv1a)
1066    {
1067        $builder->addIntX(20, $testhashs32Fnv1a, 0);
1068    }
1069
1070    /**
1071     * @param FlatBufferBuilder $builder
1072     * @param uint
1073     * @return void
1074     */
1075    public static function addTesthashu32Fnv1a(FlatBufferBuilder $builder, $testhashu32Fnv1a)
1076    {
1077        $builder->addUintX(21, $testhashu32Fnv1a, 0);
1078    }
1079
1080    /**
1081     * @param FlatBufferBuilder $builder
1082     * @param long
1083     * @return void
1084     */
1085    public static function addTesthashs64Fnv1a(FlatBufferBuilder $builder, $testhashs64Fnv1a)
1086    {
1087        $builder->addLongX(22, $testhashs64Fnv1a, 0);
1088    }
1089
1090    /**
1091     * @param FlatBufferBuilder $builder
1092     * @param ulong
1093     * @return void
1094     */
1095    public static function addTesthashu64Fnv1a(FlatBufferBuilder $builder, $testhashu64Fnv1a)
1096    {
1097        $builder->addUlongX(23, $testhashu64Fnv1a, 0);
1098    }
1099
1100    /**
1101     * @param FlatBufferBuilder $builder
1102     * @param VectorOffset
1103     * @return void
1104     */
1105    public static function addTestarrayofbools(FlatBufferBuilder $builder, $testarrayofbools)
1106    {
1107        $builder->addOffsetX(24, $testarrayofbools, 0);
1108    }
1109
1110    /**
1111     * @param FlatBufferBuilder $builder
1112     * @param array offset array
1113     * @return int vector offset
1114     */
1115    public static function createTestarrayofboolsVector(FlatBufferBuilder $builder, array $data)
1116    {
1117        $builder->startVector(1, count($data), 1);
1118        for ($i = count($data) - 1; $i >= 0; $i--) {
1119            $builder->putBool($data[$i]);
1120        }
1121        return $builder->endVector();
1122    }
1123
1124    /**
1125     * @param FlatBufferBuilder $builder
1126     * @param int $numElems
1127     * @return void
1128     */
1129    public static function startTestarrayofboolsVector(FlatBufferBuilder $builder, $numElems)
1130    {
1131        $builder->startVector(1, $numElems, 1);
1132    }
1133
1134    /**
1135     * @param FlatBufferBuilder $builder
1136     * @param float
1137     * @return void
1138     */
1139    public static function addTestf(FlatBufferBuilder $builder, $testf)
1140    {
1141        $builder->addFloatX(25, $testf, 3.14159);
1142    }
1143
1144    /**
1145     * @param FlatBufferBuilder $builder
1146     * @param float
1147     * @return void
1148     */
1149    public static function addTestf2(FlatBufferBuilder $builder, $testf2)
1150    {
1151        $builder->addFloatX(26, $testf2, 3.0);
1152    }
1153
1154    /**
1155     * @param FlatBufferBuilder $builder
1156     * @param float
1157     * @return void
1158     */
1159    public static function addTestf3(FlatBufferBuilder $builder, $testf3)
1160    {
1161        $builder->addFloatX(27, $testf3, 0.0);
1162    }
1163
1164    /**
1165     * @param FlatBufferBuilder $builder
1166     * @param VectorOffset
1167     * @return void
1168     */
1169    public static function addTestarrayofstring2(FlatBufferBuilder $builder, $testarrayofstring2)
1170    {
1171        $builder->addOffsetX(28, $testarrayofstring2, 0);
1172    }
1173
1174    /**
1175     * @param FlatBufferBuilder $builder
1176     * @param array offset array
1177     * @return int vector offset
1178     */
1179    public static function createTestarrayofstring2Vector(FlatBufferBuilder $builder, array $data)
1180    {
1181        $builder->startVector(4, count($data), 4);
1182        for ($i = count($data) - 1; $i >= 0; $i--) {
1183            $builder->putOffset($data[$i]);
1184        }
1185        return $builder->endVector();
1186    }
1187
1188    /**
1189     * @param FlatBufferBuilder $builder
1190     * @param int $numElems
1191     * @return void
1192     */
1193    public static function startTestarrayofstring2Vector(FlatBufferBuilder $builder, $numElems)
1194    {
1195        $builder->startVector(4, $numElems, 4);
1196    }
1197
1198    /**
1199     * @param FlatBufferBuilder $builder
1200     * @param VectorOffset
1201     * @return void
1202     */
1203    public static function addTestarrayofsortedstruct(FlatBufferBuilder $builder, $testarrayofsortedstruct)
1204    {
1205        $builder->addOffsetX(29, $testarrayofsortedstruct, 0);
1206    }
1207
1208    /**
1209     * @param FlatBufferBuilder $builder
1210     * @param array offset array
1211     * @return int vector offset
1212     */
1213    public static function createTestarrayofsortedstructVector(FlatBufferBuilder $builder, array $data)
1214    {
1215        $builder->startVector(8, count($data), 4);
1216        for ($i = count($data) - 1; $i >= 0; $i--) {
1217            $builder->putOffset($data[$i]);
1218        }
1219        return $builder->endVector();
1220    }
1221
1222    /**
1223     * @param FlatBufferBuilder $builder
1224     * @param int $numElems
1225     * @return void
1226     */
1227    public static function startTestarrayofsortedstructVector(FlatBufferBuilder $builder, $numElems)
1228    {
1229        $builder->startVector(8, $numElems, 4);
1230    }
1231
1232    /**
1233     * @param FlatBufferBuilder $builder
1234     * @param VectorOffset
1235     * @return void
1236     */
1237    public static function addFlex(FlatBufferBuilder $builder, $flex)
1238    {
1239        $builder->addOffsetX(30, $flex, 0);
1240    }
1241
1242    /**
1243     * @param FlatBufferBuilder $builder
1244     * @param array offset array
1245     * @return int vector offset
1246     */
1247    public static function createFlexVector(FlatBufferBuilder $builder, array $data)
1248    {
1249        $builder->startVector(1, count($data), 1);
1250        for ($i = count($data) - 1; $i >= 0; $i--) {
1251            $builder->putByte($data[$i]);
1252        }
1253        return $builder->endVector();
1254    }
1255
1256    /**
1257     * @param FlatBufferBuilder $builder
1258     * @param int $numElems
1259     * @return void
1260     */
1261    public static function startFlexVector(FlatBufferBuilder $builder, $numElems)
1262    {
1263        $builder->startVector(1, $numElems, 1);
1264    }
1265
1266    /**
1267     * @param FlatBufferBuilder $builder
1268     * @param VectorOffset
1269     * @return void
1270     */
1271    public static function addTest5(FlatBufferBuilder $builder, $test5)
1272    {
1273        $builder->addOffsetX(31, $test5, 0);
1274    }
1275
1276    /**
1277     * @param FlatBufferBuilder $builder
1278     * @param array offset array
1279     * @return int vector offset
1280     */
1281    public static function createTest5Vector(FlatBufferBuilder $builder, array $data)
1282    {
1283        $builder->startVector(4, count($data), 2);
1284        for ($i = count($data) - 1; $i >= 0; $i--) {
1285            $builder->putOffset($data[$i]);
1286        }
1287        return $builder->endVector();
1288    }
1289
1290    /**
1291     * @param FlatBufferBuilder $builder
1292     * @param int $numElems
1293     * @return void
1294     */
1295    public static function startTest5Vector(FlatBufferBuilder $builder, $numElems)
1296    {
1297        $builder->startVector(4, $numElems, 2);
1298    }
1299
1300    /**
1301     * @param FlatBufferBuilder $builder
1302     * @param VectorOffset
1303     * @return void
1304     */
1305    public static function addVectorOfLongs(FlatBufferBuilder $builder, $vectorOfLongs)
1306    {
1307        $builder->addOffsetX(32, $vectorOfLongs, 0);
1308    }
1309
1310    /**
1311     * @param FlatBufferBuilder $builder
1312     * @param array offset array
1313     * @return int vector offset
1314     */
1315    public static function createVectorOfLongsVector(FlatBufferBuilder $builder, array $data)
1316    {
1317        $builder->startVector(8, count($data), 8);
1318        for ($i = count($data) - 1; $i >= 0; $i--) {
1319            $builder->putLong($data[$i]);
1320        }
1321        return $builder->endVector();
1322    }
1323
1324    /**
1325     * @param FlatBufferBuilder $builder
1326     * @param int $numElems
1327     * @return void
1328     */
1329    public static function startVectorOfLongsVector(FlatBufferBuilder $builder, $numElems)
1330    {
1331        $builder->startVector(8, $numElems, 8);
1332    }
1333
1334    /**
1335     * @param FlatBufferBuilder $builder
1336     * @param VectorOffset
1337     * @return void
1338     */
1339    public static function addVectorOfDoubles(FlatBufferBuilder $builder, $vectorOfDoubles)
1340    {
1341        $builder->addOffsetX(33, $vectorOfDoubles, 0);
1342    }
1343
1344    /**
1345     * @param FlatBufferBuilder $builder
1346     * @param array offset array
1347     * @return int vector offset
1348     */
1349    public static function createVectorOfDoublesVector(FlatBufferBuilder $builder, array $data)
1350    {
1351        $builder->startVector(8, count($data), 8);
1352        for ($i = count($data) - 1; $i >= 0; $i--) {
1353            $builder->putDouble($data[$i]);
1354        }
1355        return $builder->endVector();
1356    }
1357
1358    /**
1359     * @param FlatBufferBuilder $builder
1360     * @param int $numElems
1361     * @return void
1362     */
1363    public static function startVectorOfDoublesVector(FlatBufferBuilder $builder, $numElems)
1364    {
1365        $builder->startVector(8, $numElems, 8);
1366    }
1367
1368    /**
1369     * @param FlatBufferBuilder $builder
1370     * @param int
1371     * @return void
1372     */
1373    public static function addParentNamespaceTest(FlatBufferBuilder $builder, $parentNamespaceTest)
1374    {
1375        $builder->addOffsetX(34, $parentNamespaceTest, 0);
1376    }
1377
1378    /**
1379     * @param FlatBufferBuilder $builder
1380     * @param VectorOffset
1381     * @return void
1382     */
1383    public static function addVectorOfReferrables(FlatBufferBuilder $builder, $vectorOfReferrables)
1384    {
1385        $builder->addOffsetX(35, $vectorOfReferrables, 0);
1386    }
1387
1388    /**
1389     * @param FlatBufferBuilder $builder
1390     * @param array offset array
1391     * @return int vector offset
1392     */
1393    public static function createVectorOfReferrablesVector(FlatBufferBuilder $builder, array $data)
1394    {
1395        $builder->startVector(4, count($data), 4);
1396        for ($i = count($data) - 1; $i >= 0; $i--) {
1397            $builder->putOffset($data[$i]);
1398        }
1399        return $builder->endVector();
1400    }
1401
1402    /**
1403     * @param FlatBufferBuilder $builder
1404     * @param int $numElems
1405     * @return void
1406     */
1407    public static function startVectorOfReferrablesVector(FlatBufferBuilder $builder, $numElems)
1408    {
1409        $builder->startVector(4, $numElems, 4);
1410    }
1411
1412    /**
1413     * @param FlatBufferBuilder $builder
1414     * @param ulong
1415     * @return void
1416     */
1417    public static function addSingleWeakReference(FlatBufferBuilder $builder, $singleWeakReference)
1418    {
1419        $builder->addUlongX(36, $singleWeakReference, 0);
1420    }
1421
1422    /**
1423     * @param FlatBufferBuilder $builder
1424     * @param VectorOffset
1425     * @return void
1426     */
1427    public static function addVectorOfWeakReferences(FlatBufferBuilder $builder, $vectorOfWeakReferences)
1428    {
1429        $builder->addOffsetX(37, $vectorOfWeakReferences, 0);
1430    }
1431
1432    /**
1433     * @param FlatBufferBuilder $builder
1434     * @param array offset array
1435     * @return int vector offset
1436     */
1437    public static function createVectorOfWeakReferencesVector(FlatBufferBuilder $builder, array $data)
1438    {
1439        $builder->startVector(8, count($data), 8);
1440        for ($i = count($data) - 1; $i >= 0; $i--) {
1441            $builder->putUlong($data[$i]);
1442        }
1443        return $builder->endVector();
1444    }
1445
1446    /**
1447     * @param FlatBufferBuilder $builder
1448     * @param int $numElems
1449     * @return void
1450     */
1451    public static function startVectorOfWeakReferencesVector(FlatBufferBuilder $builder, $numElems)
1452    {
1453        $builder->startVector(8, $numElems, 8);
1454    }
1455
1456    /**
1457     * @param FlatBufferBuilder $builder
1458     * @param VectorOffset
1459     * @return void
1460     */
1461    public static function addVectorOfStrongReferrables(FlatBufferBuilder $builder, $vectorOfStrongReferrables)
1462    {
1463        $builder->addOffsetX(38, $vectorOfStrongReferrables, 0);
1464    }
1465
1466    /**
1467     * @param FlatBufferBuilder $builder
1468     * @param array offset array
1469     * @return int vector offset
1470     */
1471    public static function createVectorOfStrongReferrablesVector(FlatBufferBuilder $builder, array $data)
1472    {
1473        $builder->startVector(4, count($data), 4);
1474        for ($i = count($data) - 1; $i >= 0; $i--) {
1475            $builder->putOffset($data[$i]);
1476        }
1477        return $builder->endVector();
1478    }
1479
1480    /**
1481     * @param FlatBufferBuilder $builder
1482     * @param int $numElems
1483     * @return void
1484     */
1485    public static function startVectorOfStrongReferrablesVector(FlatBufferBuilder $builder, $numElems)
1486    {
1487        $builder->startVector(4, $numElems, 4);
1488    }
1489
1490    /**
1491     * @param FlatBufferBuilder $builder
1492     * @param ulong
1493     * @return void
1494     */
1495    public static function addCoOwningReference(FlatBufferBuilder $builder, $coOwningReference)
1496    {
1497        $builder->addUlongX(39, $coOwningReference, 0);
1498    }
1499
1500    /**
1501     * @param FlatBufferBuilder $builder
1502     * @param VectorOffset
1503     * @return void
1504     */
1505    public static function addVectorOfCoOwningReferences(FlatBufferBuilder $builder, $vectorOfCoOwningReferences)
1506    {
1507        $builder->addOffsetX(40, $vectorOfCoOwningReferences, 0);
1508    }
1509
1510    /**
1511     * @param FlatBufferBuilder $builder
1512     * @param array offset array
1513     * @return int vector offset
1514     */
1515    public static function createVectorOfCoOwningReferencesVector(FlatBufferBuilder $builder, array $data)
1516    {
1517        $builder->startVector(8, count($data), 8);
1518        for ($i = count($data) - 1; $i >= 0; $i--) {
1519            $builder->putUlong($data[$i]);
1520        }
1521        return $builder->endVector();
1522    }
1523
1524    /**
1525     * @param FlatBufferBuilder $builder
1526     * @param int $numElems
1527     * @return void
1528     */
1529    public static function startVectorOfCoOwningReferencesVector(FlatBufferBuilder $builder, $numElems)
1530    {
1531        $builder->startVector(8, $numElems, 8);
1532    }
1533
1534    /**
1535     * @param FlatBufferBuilder $builder
1536     * @param ulong
1537     * @return void
1538     */
1539    public static function addNonOwningReference(FlatBufferBuilder $builder, $nonOwningReference)
1540    {
1541        $builder->addUlongX(41, $nonOwningReference, 0);
1542    }
1543
1544    /**
1545     * @param FlatBufferBuilder $builder
1546     * @param VectorOffset
1547     * @return void
1548     */
1549    public static function addVectorOfNonOwningReferences(FlatBufferBuilder $builder, $vectorOfNonOwningReferences)
1550    {
1551        $builder->addOffsetX(42, $vectorOfNonOwningReferences, 0);
1552    }
1553
1554    /**
1555     * @param FlatBufferBuilder $builder
1556     * @param array offset array
1557     * @return int vector offset
1558     */
1559    public static function createVectorOfNonOwningReferencesVector(FlatBufferBuilder $builder, array $data)
1560    {
1561        $builder->startVector(8, count($data), 8);
1562        for ($i = count($data) - 1; $i >= 0; $i--) {
1563            $builder->putUlong($data[$i]);
1564        }
1565        return $builder->endVector();
1566    }
1567
1568    /**
1569     * @param FlatBufferBuilder $builder
1570     * @param int $numElems
1571     * @return void
1572     */
1573    public static function startVectorOfNonOwningReferencesVector(FlatBufferBuilder $builder, $numElems)
1574    {
1575        $builder->startVector(8, $numElems, 8);
1576    }
1577
1578    /**
1579     * @param FlatBufferBuilder $builder
1580     * @param byte
1581     * @return void
1582     */
1583    public static function addAnyUniqueType(FlatBufferBuilder $builder, $anyUniqueType)
1584    {
1585        $builder->addByteX(43, $anyUniqueType, 0);
1586    }
1587
1588    public static function addAnyUnique(FlatBufferBuilder $builder, $offset)
1589    {
1590        $builder->addOffsetX(44, $offset, 0);
1591    }
1592
1593    /**
1594     * @param FlatBufferBuilder $builder
1595     * @param byte
1596     * @return void
1597     */
1598    public static function addAnyAmbiguousType(FlatBufferBuilder $builder, $anyAmbiguousType)
1599    {
1600        $builder->addByteX(45, $anyAmbiguousType, 0);
1601    }
1602
1603    public static function addAnyAmbiguous(FlatBufferBuilder $builder, $offset)
1604    {
1605        $builder->addOffsetX(46, $offset, 0);
1606    }
1607
1608    /**
1609     * @param FlatBufferBuilder $builder
1610     * @param VectorOffset
1611     * @return void
1612     */
1613    public static function addVectorOfEnums(FlatBufferBuilder $builder, $vectorOfEnums)
1614    {
1615        $builder->addOffsetX(47, $vectorOfEnums, 0);
1616    }
1617
1618    /**
1619     * @param FlatBufferBuilder $builder
1620     * @param array offset array
1621     * @return int vector offset
1622     */
1623    public static function createVectorOfEnumsVector(FlatBufferBuilder $builder, array $data)
1624    {
1625        $builder->startVector(1, count($data), 1);
1626        for ($i = count($data) - 1; $i >= 0; $i--) {
1627            $builder->putByte($data[$i]);
1628        }
1629        return $builder->endVector();
1630    }
1631
1632    /**
1633     * @param FlatBufferBuilder $builder
1634     * @param int $numElems
1635     * @return void
1636     */
1637    public static function startVectorOfEnumsVector(FlatBufferBuilder $builder, $numElems)
1638    {
1639        $builder->startVector(1, $numElems, 1);
1640    }
1641
1642    /**
1643     * @param FlatBufferBuilder $builder
1644     * @param sbyte
1645     * @return void
1646     */
1647    public static function addSignedEnum(FlatBufferBuilder $builder, $signedEnum)
1648    {
1649        $builder->addSbyteX(48, $signedEnum, -1);
1650    }
1651
1652    /**
1653     * @param FlatBufferBuilder $builder
1654     * @return int table offset
1655     */
1656    public static function endMonster(FlatBufferBuilder $builder)
1657    {
1658        $o = $builder->endObject();
1659        $builder->required($o, 10);  // name
1660        return $o;
1661    }
1662
1663    public static function finishMonsterBuffer(FlatBufferBuilder $builder, $offset)
1664    {
1665        $builder->finish($offset, "MONS");
1666    }
1667}
1668