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 sbyte 111 */ 112 public function getColor() 113 { 114 $o = $this->__offset(16); 115 return $o != 0 ? $this->bb->getSbyte($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 sbyte 653 */ 654 public function getVectorOfEnums($j) 655 { 656 $o = $this->__offset(98); 657 return $o != 0 ? $this->bb->getSbyte($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 * @param FlatBufferBuilder $builder 671 * @return void 672 */ 673 public static function startMonster(FlatBufferBuilder $builder) 674 { 675 $builder->StartObject(48); 676 } 677 678 /** 679 * @param FlatBufferBuilder $builder 680 * @return Monster 681 */ 682 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) 683 { 684 $builder->startObject(48); 685 self::addPos($builder, $pos); 686 self::addMana($builder, $mana); 687 self::addHp($builder, $hp); 688 self::addName($builder, $name); 689 self::addInventory($builder, $inventory); 690 self::addColor($builder, $color); 691 self::addTestType($builder, $test_type); 692 self::addTest($builder, $test); 693 self::addTest4($builder, $test4); 694 self::addTestarrayofstring($builder, $testarrayofstring); 695 self::addTestarrayoftables($builder, $testarrayoftables); 696 self::addEnemy($builder, $enemy); 697 self::addTestnestedflatbuffer($builder, $testnestedflatbuffer); 698 self::addTestempty($builder, $testempty); 699 self::addTestbool($builder, $testbool); 700 self::addTesthashs32Fnv1($builder, $testhashs32_fnv1); 701 self::addTesthashu32Fnv1($builder, $testhashu32_fnv1); 702 self::addTesthashs64Fnv1($builder, $testhashs64_fnv1); 703 self::addTesthashu64Fnv1($builder, $testhashu64_fnv1); 704 self::addTesthashs32Fnv1a($builder, $testhashs32_fnv1a); 705 self::addTesthashu32Fnv1a($builder, $testhashu32_fnv1a); 706 self::addTesthashs64Fnv1a($builder, $testhashs64_fnv1a); 707 self::addTesthashu64Fnv1a($builder, $testhashu64_fnv1a); 708 self::addTestarrayofbools($builder, $testarrayofbools); 709 self::addTestf($builder, $testf); 710 self::addTestf2($builder, $testf2); 711 self::addTestf3($builder, $testf3); 712 self::addTestarrayofstring2($builder, $testarrayofstring2); 713 self::addTestarrayofsortedstruct($builder, $testarrayofsortedstruct); 714 self::addFlex($builder, $flex); 715 self::addTest5($builder, $test5); 716 self::addVectorOfLongs($builder, $vector_of_longs); 717 self::addVectorOfDoubles($builder, $vector_of_doubles); 718 self::addParentNamespaceTest($builder, $parent_namespace_test); 719 self::addVectorOfReferrables($builder, $vector_of_referrables); 720 self::addSingleWeakReference($builder, $single_weak_reference); 721 self::addVectorOfWeakReferences($builder, $vector_of_weak_references); 722 self::addVectorOfStrongReferrables($builder, $vector_of_strong_referrables); 723 self::addCoOwningReference($builder, $co_owning_reference); 724 self::addVectorOfCoOwningReferences($builder, $vector_of_co_owning_references); 725 self::addNonOwningReference($builder, $non_owning_reference); 726 self::addVectorOfNonOwningReferences($builder, $vector_of_non_owning_references); 727 self::addAnyUniqueType($builder, $any_unique_type); 728 self::addAnyUnique($builder, $any_unique); 729 self::addAnyAmbiguousType($builder, $any_ambiguous_type); 730 self::addAnyAmbiguous($builder, $any_ambiguous); 731 self::addVectorOfEnums($builder, $vector_of_enums); 732 $o = $builder->endObject(); 733 $builder->required($o, 10); // name 734 return $o; 735 } 736 737 /** 738 * @param FlatBufferBuilder $builder 739 * @param int 740 * @return void 741 */ 742 public static function addPos(FlatBufferBuilder $builder, $pos) 743 { 744 $builder->addStructX(0, $pos, 0); 745 } 746 747 /** 748 * @param FlatBufferBuilder $builder 749 * @param short 750 * @return void 751 */ 752 public static function addMana(FlatBufferBuilder $builder, $mana) 753 { 754 $builder->addShortX(1, $mana, 150); 755 } 756 757 /** 758 * @param FlatBufferBuilder $builder 759 * @param short 760 * @return void 761 */ 762 public static function addHp(FlatBufferBuilder $builder, $hp) 763 { 764 $builder->addShortX(2, $hp, 100); 765 } 766 767 /** 768 * @param FlatBufferBuilder $builder 769 * @param StringOffset 770 * @return void 771 */ 772 public static function addName(FlatBufferBuilder $builder, $name) 773 { 774 $builder->addOffsetX(3, $name, 0); 775 } 776 777 /** 778 * @param FlatBufferBuilder $builder 779 * @param VectorOffset 780 * @return void 781 */ 782 public static function addInventory(FlatBufferBuilder $builder, $inventory) 783 { 784 $builder->addOffsetX(5, $inventory, 0); 785 } 786 787 /** 788 * @param FlatBufferBuilder $builder 789 * @param array offset array 790 * @return int vector offset 791 */ 792 public static function createInventoryVector(FlatBufferBuilder $builder, array $data) 793 { 794 $builder->startVector(1, count($data), 1); 795 for ($i = count($data) - 1; $i >= 0; $i--) { 796 $builder->putByte($data[$i]); 797 } 798 return $builder->endVector(); 799 } 800 801 /** 802 * @param FlatBufferBuilder $builder 803 * @param int $numElems 804 * @return void 805 */ 806 public static function startInventoryVector(FlatBufferBuilder $builder, $numElems) 807 { 808 $builder->startVector(1, $numElems, 1); 809 } 810 811 /** 812 * @param FlatBufferBuilder $builder 813 * @param sbyte 814 * @return void 815 */ 816 public static function addColor(FlatBufferBuilder $builder, $color) 817 { 818 $builder->addSbyteX(6, $color, 8); 819 } 820 821 /** 822 * @param FlatBufferBuilder $builder 823 * @param byte 824 * @return void 825 */ 826 public static function addTestType(FlatBufferBuilder $builder, $testType) 827 { 828 $builder->addByteX(7, $testType, 0); 829 } 830 831 public static function addTest(FlatBufferBuilder $builder, $offset) 832 { 833 $builder->addOffsetX(8, $offset, 0); 834 } 835 836 /** 837 * @param FlatBufferBuilder $builder 838 * @param VectorOffset 839 * @return void 840 */ 841 public static function addTest4(FlatBufferBuilder $builder, $test4) 842 { 843 $builder->addOffsetX(9, $test4, 0); 844 } 845 846 /** 847 * @param FlatBufferBuilder $builder 848 * @param array offset array 849 * @return int vector offset 850 */ 851 public static function createTest4Vector(FlatBufferBuilder $builder, array $data) 852 { 853 $builder->startVector(4, count($data), 2); 854 for ($i = count($data) - 1; $i >= 0; $i--) { 855 $builder->putOffset($data[$i]); 856 } 857 return $builder->endVector(); 858 } 859 860 /** 861 * @param FlatBufferBuilder $builder 862 * @param int $numElems 863 * @return void 864 */ 865 public static function startTest4Vector(FlatBufferBuilder $builder, $numElems) 866 { 867 $builder->startVector(4, $numElems, 2); 868 } 869 870 /** 871 * @param FlatBufferBuilder $builder 872 * @param VectorOffset 873 * @return void 874 */ 875 public static function addTestarrayofstring(FlatBufferBuilder $builder, $testarrayofstring) 876 { 877 $builder->addOffsetX(10, $testarrayofstring, 0); 878 } 879 880 /** 881 * @param FlatBufferBuilder $builder 882 * @param array offset array 883 * @return int vector offset 884 */ 885 public static function createTestarrayofstringVector(FlatBufferBuilder $builder, array $data) 886 { 887 $builder->startVector(4, count($data), 4); 888 for ($i = count($data) - 1; $i >= 0; $i--) { 889 $builder->putOffset($data[$i]); 890 } 891 return $builder->endVector(); 892 } 893 894 /** 895 * @param FlatBufferBuilder $builder 896 * @param int $numElems 897 * @return void 898 */ 899 public static function startTestarrayofstringVector(FlatBufferBuilder $builder, $numElems) 900 { 901 $builder->startVector(4, $numElems, 4); 902 } 903 904 /** 905 * @param FlatBufferBuilder $builder 906 * @param VectorOffset 907 * @return void 908 */ 909 public static function addTestarrayoftables(FlatBufferBuilder $builder, $testarrayoftables) 910 { 911 $builder->addOffsetX(11, $testarrayoftables, 0); 912 } 913 914 /** 915 * @param FlatBufferBuilder $builder 916 * @param array offset array 917 * @return int vector offset 918 */ 919 public static function createTestarrayoftablesVector(FlatBufferBuilder $builder, array $data) 920 { 921 $builder->startVector(4, count($data), 4); 922 for ($i = count($data) - 1; $i >= 0; $i--) { 923 $builder->putOffset($data[$i]); 924 } 925 return $builder->endVector(); 926 } 927 928 /** 929 * @param FlatBufferBuilder $builder 930 * @param int $numElems 931 * @return void 932 */ 933 public static function startTestarrayoftablesVector(FlatBufferBuilder $builder, $numElems) 934 { 935 $builder->startVector(4, $numElems, 4); 936 } 937 938 /** 939 * @param FlatBufferBuilder $builder 940 * @param int 941 * @return void 942 */ 943 public static function addEnemy(FlatBufferBuilder $builder, $enemy) 944 { 945 $builder->addOffsetX(12, $enemy, 0); 946 } 947 948 /** 949 * @param FlatBufferBuilder $builder 950 * @param VectorOffset 951 * @return void 952 */ 953 public static function addTestnestedflatbuffer(FlatBufferBuilder $builder, $testnestedflatbuffer) 954 { 955 $builder->addOffsetX(13, $testnestedflatbuffer, 0); 956 } 957 958 /** 959 * @param FlatBufferBuilder $builder 960 * @param array offset array 961 * @return int vector offset 962 */ 963 public static function createTestnestedflatbufferVector(FlatBufferBuilder $builder, array $data) 964 { 965 $builder->startVector(1, count($data), 1); 966 for ($i = count($data) - 1; $i >= 0; $i--) { 967 $builder->putByte($data[$i]); 968 } 969 return $builder->endVector(); 970 } 971 972 /** 973 * @param FlatBufferBuilder $builder 974 * @param int $numElems 975 * @return void 976 */ 977 public static function startTestnestedflatbufferVector(FlatBufferBuilder $builder, $numElems) 978 { 979 $builder->startVector(1, $numElems, 1); 980 } 981 982 /** 983 * @param FlatBufferBuilder $builder 984 * @param int 985 * @return void 986 */ 987 public static function addTestempty(FlatBufferBuilder $builder, $testempty) 988 { 989 $builder->addOffsetX(14, $testempty, 0); 990 } 991 992 /** 993 * @param FlatBufferBuilder $builder 994 * @param bool 995 * @return void 996 */ 997 public static function addTestbool(FlatBufferBuilder $builder, $testbool) 998 { 999 $builder->addBoolX(15, $testbool, false); 1000 } 1001 1002 /** 1003 * @param FlatBufferBuilder $builder 1004 * @param int 1005 * @return void 1006 */ 1007 public static function addTesthashs32Fnv1(FlatBufferBuilder $builder, $testhashs32Fnv1) 1008 { 1009 $builder->addIntX(16, $testhashs32Fnv1, 0); 1010 } 1011 1012 /** 1013 * @param FlatBufferBuilder $builder 1014 * @param uint 1015 * @return void 1016 */ 1017 public static function addTesthashu32Fnv1(FlatBufferBuilder $builder, $testhashu32Fnv1) 1018 { 1019 $builder->addUintX(17, $testhashu32Fnv1, 0); 1020 } 1021 1022 /** 1023 * @param FlatBufferBuilder $builder 1024 * @param long 1025 * @return void 1026 */ 1027 public static function addTesthashs64Fnv1(FlatBufferBuilder $builder, $testhashs64Fnv1) 1028 { 1029 $builder->addLongX(18, $testhashs64Fnv1, 0); 1030 } 1031 1032 /** 1033 * @param FlatBufferBuilder $builder 1034 * @param ulong 1035 * @return void 1036 */ 1037 public static function addTesthashu64Fnv1(FlatBufferBuilder $builder, $testhashu64Fnv1) 1038 { 1039 $builder->addUlongX(19, $testhashu64Fnv1, 0); 1040 } 1041 1042 /** 1043 * @param FlatBufferBuilder $builder 1044 * @param int 1045 * @return void 1046 */ 1047 public static function addTesthashs32Fnv1a(FlatBufferBuilder $builder, $testhashs32Fnv1a) 1048 { 1049 $builder->addIntX(20, $testhashs32Fnv1a, 0); 1050 } 1051 1052 /** 1053 * @param FlatBufferBuilder $builder 1054 * @param uint 1055 * @return void 1056 */ 1057 public static function addTesthashu32Fnv1a(FlatBufferBuilder $builder, $testhashu32Fnv1a) 1058 { 1059 $builder->addUintX(21, $testhashu32Fnv1a, 0); 1060 } 1061 1062 /** 1063 * @param FlatBufferBuilder $builder 1064 * @param long 1065 * @return void 1066 */ 1067 public static function addTesthashs64Fnv1a(FlatBufferBuilder $builder, $testhashs64Fnv1a) 1068 { 1069 $builder->addLongX(22, $testhashs64Fnv1a, 0); 1070 } 1071 1072 /** 1073 * @param FlatBufferBuilder $builder 1074 * @param ulong 1075 * @return void 1076 */ 1077 public static function addTesthashu64Fnv1a(FlatBufferBuilder $builder, $testhashu64Fnv1a) 1078 { 1079 $builder->addUlongX(23, $testhashu64Fnv1a, 0); 1080 } 1081 1082 /** 1083 * @param FlatBufferBuilder $builder 1084 * @param VectorOffset 1085 * @return void 1086 */ 1087 public static function addTestarrayofbools(FlatBufferBuilder $builder, $testarrayofbools) 1088 { 1089 $builder->addOffsetX(24, $testarrayofbools, 0); 1090 } 1091 1092 /** 1093 * @param FlatBufferBuilder $builder 1094 * @param array offset array 1095 * @return int vector offset 1096 */ 1097 public static function createTestarrayofboolsVector(FlatBufferBuilder $builder, array $data) 1098 { 1099 $builder->startVector(1, count($data), 1); 1100 for ($i = count($data) - 1; $i >= 0; $i--) { 1101 $builder->putBool($data[$i]); 1102 } 1103 return $builder->endVector(); 1104 } 1105 1106 /** 1107 * @param FlatBufferBuilder $builder 1108 * @param int $numElems 1109 * @return void 1110 */ 1111 public static function startTestarrayofboolsVector(FlatBufferBuilder $builder, $numElems) 1112 { 1113 $builder->startVector(1, $numElems, 1); 1114 } 1115 1116 /** 1117 * @param FlatBufferBuilder $builder 1118 * @param float 1119 * @return void 1120 */ 1121 public static function addTestf(FlatBufferBuilder $builder, $testf) 1122 { 1123 $builder->addFloatX(25, $testf, 3.14159); 1124 } 1125 1126 /** 1127 * @param FlatBufferBuilder $builder 1128 * @param float 1129 * @return void 1130 */ 1131 public static function addTestf2(FlatBufferBuilder $builder, $testf2) 1132 { 1133 $builder->addFloatX(26, $testf2, 3.0); 1134 } 1135 1136 /** 1137 * @param FlatBufferBuilder $builder 1138 * @param float 1139 * @return void 1140 */ 1141 public static function addTestf3(FlatBufferBuilder $builder, $testf3) 1142 { 1143 $builder->addFloatX(27, $testf3, 0.0); 1144 } 1145 1146 /** 1147 * @param FlatBufferBuilder $builder 1148 * @param VectorOffset 1149 * @return void 1150 */ 1151 public static function addTestarrayofstring2(FlatBufferBuilder $builder, $testarrayofstring2) 1152 { 1153 $builder->addOffsetX(28, $testarrayofstring2, 0); 1154 } 1155 1156 /** 1157 * @param FlatBufferBuilder $builder 1158 * @param array offset array 1159 * @return int vector offset 1160 */ 1161 public static function createTestarrayofstring2Vector(FlatBufferBuilder $builder, array $data) 1162 { 1163 $builder->startVector(4, count($data), 4); 1164 for ($i = count($data) - 1; $i >= 0; $i--) { 1165 $builder->putOffset($data[$i]); 1166 } 1167 return $builder->endVector(); 1168 } 1169 1170 /** 1171 * @param FlatBufferBuilder $builder 1172 * @param int $numElems 1173 * @return void 1174 */ 1175 public static function startTestarrayofstring2Vector(FlatBufferBuilder $builder, $numElems) 1176 { 1177 $builder->startVector(4, $numElems, 4); 1178 } 1179 1180 /** 1181 * @param FlatBufferBuilder $builder 1182 * @param VectorOffset 1183 * @return void 1184 */ 1185 public static function addTestarrayofsortedstruct(FlatBufferBuilder $builder, $testarrayofsortedstruct) 1186 { 1187 $builder->addOffsetX(29, $testarrayofsortedstruct, 0); 1188 } 1189 1190 /** 1191 * @param FlatBufferBuilder $builder 1192 * @param array offset array 1193 * @return int vector offset 1194 */ 1195 public static function createTestarrayofsortedstructVector(FlatBufferBuilder $builder, array $data) 1196 { 1197 $builder->startVector(8, count($data), 4); 1198 for ($i = count($data) - 1; $i >= 0; $i--) { 1199 $builder->putOffset($data[$i]); 1200 } 1201 return $builder->endVector(); 1202 } 1203 1204 /** 1205 * @param FlatBufferBuilder $builder 1206 * @param int $numElems 1207 * @return void 1208 */ 1209 public static function startTestarrayofsortedstructVector(FlatBufferBuilder $builder, $numElems) 1210 { 1211 $builder->startVector(8, $numElems, 4); 1212 } 1213 1214 /** 1215 * @param FlatBufferBuilder $builder 1216 * @param VectorOffset 1217 * @return void 1218 */ 1219 public static function addFlex(FlatBufferBuilder $builder, $flex) 1220 { 1221 $builder->addOffsetX(30, $flex, 0); 1222 } 1223 1224 /** 1225 * @param FlatBufferBuilder $builder 1226 * @param array offset array 1227 * @return int vector offset 1228 */ 1229 public static function createFlexVector(FlatBufferBuilder $builder, array $data) 1230 { 1231 $builder->startVector(1, count($data), 1); 1232 for ($i = count($data) - 1; $i >= 0; $i--) { 1233 $builder->putByte($data[$i]); 1234 } 1235 return $builder->endVector(); 1236 } 1237 1238 /** 1239 * @param FlatBufferBuilder $builder 1240 * @param int $numElems 1241 * @return void 1242 */ 1243 public static function startFlexVector(FlatBufferBuilder $builder, $numElems) 1244 { 1245 $builder->startVector(1, $numElems, 1); 1246 } 1247 1248 /** 1249 * @param FlatBufferBuilder $builder 1250 * @param VectorOffset 1251 * @return void 1252 */ 1253 public static function addTest5(FlatBufferBuilder $builder, $test5) 1254 { 1255 $builder->addOffsetX(31, $test5, 0); 1256 } 1257 1258 /** 1259 * @param FlatBufferBuilder $builder 1260 * @param array offset array 1261 * @return int vector offset 1262 */ 1263 public static function createTest5Vector(FlatBufferBuilder $builder, array $data) 1264 { 1265 $builder->startVector(4, count($data), 2); 1266 for ($i = count($data) - 1; $i >= 0; $i--) { 1267 $builder->putOffset($data[$i]); 1268 } 1269 return $builder->endVector(); 1270 } 1271 1272 /** 1273 * @param FlatBufferBuilder $builder 1274 * @param int $numElems 1275 * @return void 1276 */ 1277 public static function startTest5Vector(FlatBufferBuilder $builder, $numElems) 1278 { 1279 $builder->startVector(4, $numElems, 2); 1280 } 1281 1282 /** 1283 * @param FlatBufferBuilder $builder 1284 * @param VectorOffset 1285 * @return void 1286 */ 1287 public static function addVectorOfLongs(FlatBufferBuilder $builder, $vectorOfLongs) 1288 { 1289 $builder->addOffsetX(32, $vectorOfLongs, 0); 1290 } 1291 1292 /** 1293 * @param FlatBufferBuilder $builder 1294 * @param array offset array 1295 * @return int vector offset 1296 */ 1297 public static function createVectorOfLongsVector(FlatBufferBuilder $builder, array $data) 1298 { 1299 $builder->startVector(8, count($data), 8); 1300 for ($i = count($data) - 1; $i >= 0; $i--) { 1301 $builder->putLong($data[$i]); 1302 } 1303 return $builder->endVector(); 1304 } 1305 1306 /** 1307 * @param FlatBufferBuilder $builder 1308 * @param int $numElems 1309 * @return void 1310 */ 1311 public static function startVectorOfLongsVector(FlatBufferBuilder $builder, $numElems) 1312 { 1313 $builder->startVector(8, $numElems, 8); 1314 } 1315 1316 /** 1317 * @param FlatBufferBuilder $builder 1318 * @param VectorOffset 1319 * @return void 1320 */ 1321 public static function addVectorOfDoubles(FlatBufferBuilder $builder, $vectorOfDoubles) 1322 { 1323 $builder->addOffsetX(33, $vectorOfDoubles, 0); 1324 } 1325 1326 /** 1327 * @param FlatBufferBuilder $builder 1328 * @param array offset array 1329 * @return int vector offset 1330 */ 1331 public static function createVectorOfDoublesVector(FlatBufferBuilder $builder, array $data) 1332 { 1333 $builder->startVector(8, count($data), 8); 1334 for ($i = count($data) - 1; $i >= 0; $i--) { 1335 $builder->putDouble($data[$i]); 1336 } 1337 return $builder->endVector(); 1338 } 1339 1340 /** 1341 * @param FlatBufferBuilder $builder 1342 * @param int $numElems 1343 * @return void 1344 */ 1345 public static function startVectorOfDoublesVector(FlatBufferBuilder $builder, $numElems) 1346 { 1347 $builder->startVector(8, $numElems, 8); 1348 } 1349 1350 /** 1351 * @param FlatBufferBuilder $builder 1352 * @param int 1353 * @return void 1354 */ 1355 public static function addParentNamespaceTest(FlatBufferBuilder $builder, $parentNamespaceTest) 1356 { 1357 $builder->addOffsetX(34, $parentNamespaceTest, 0); 1358 } 1359 1360 /** 1361 * @param FlatBufferBuilder $builder 1362 * @param VectorOffset 1363 * @return void 1364 */ 1365 public static function addVectorOfReferrables(FlatBufferBuilder $builder, $vectorOfReferrables) 1366 { 1367 $builder->addOffsetX(35, $vectorOfReferrables, 0); 1368 } 1369 1370 /** 1371 * @param FlatBufferBuilder $builder 1372 * @param array offset array 1373 * @return int vector offset 1374 */ 1375 public static function createVectorOfReferrablesVector(FlatBufferBuilder $builder, array $data) 1376 { 1377 $builder->startVector(4, count($data), 4); 1378 for ($i = count($data) - 1; $i >= 0; $i--) { 1379 $builder->putOffset($data[$i]); 1380 } 1381 return $builder->endVector(); 1382 } 1383 1384 /** 1385 * @param FlatBufferBuilder $builder 1386 * @param int $numElems 1387 * @return void 1388 */ 1389 public static function startVectorOfReferrablesVector(FlatBufferBuilder $builder, $numElems) 1390 { 1391 $builder->startVector(4, $numElems, 4); 1392 } 1393 1394 /** 1395 * @param FlatBufferBuilder $builder 1396 * @param ulong 1397 * @return void 1398 */ 1399 public static function addSingleWeakReference(FlatBufferBuilder $builder, $singleWeakReference) 1400 { 1401 $builder->addUlongX(36, $singleWeakReference, 0); 1402 } 1403 1404 /** 1405 * @param FlatBufferBuilder $builder 1406 * @param VectorOffset 1407 * @return void 1408 */ 1409 public static function addVectorOfWeakReferences(FlatBufferBuilder $builder, $vectorOfWeakReferences) 1410 { 1411 $builder->addOffsetX(37, $vectorOfWeakReferences, 0); 1412 } 1413 1414 /** 1415 * @param FlatBufferBuilder $builder 1416 * @param array offset array 1417 * @return int vector offset 1418 */ 1419 public static function createVectorOfWeakReferencesVector(FlatBufferBuilder $builder, array $data) 1420 { 1421 $builder->startVector(8, count($data), 8); 1422 for ($i = count($data) - 1; $i >= 0; $i--) { 1423 $builder->putUlong($data[$i]); 1424 } 1425 return $builder->endVector(); 1426 } 1427 1428 /** 1429 * @param FlatBufferBuilder $builder 1430 * @param int $numElems 1431 * @return void 1432 */ 1433 public static function startVectorOfWeakReferencesVector(FlatBufferBuilder $builder, $numElems) 1434 { 1435 $builder->startVector(8, $numElems, 8); 1436 } 1437 1438 /** 1439 * @param FlatBufferBuilder $builder 1440 * @param VectorOffset 1441 * @return void 1442 */ 1443 public static function addVectorOfStrongReferrables(FlatBufferBuilder $builder, $vectorOfStrongReferrables) 1444 { 1445 $builder->addOffsetX(38, $vectorOfStrongReferrables, 0); 1446 } 1447 1448 /** 1449 * @param FlatBufferBuilder $builder 1450 * @param array offset array 1451 * @return int vector offset 1452 */ 1453 public static function createVectorOfStrongReferrablesVector(FlatBufferBuilder $builder, array $data) 1454 { 1455 $builder->startVector(4, count($data), 4); 1456 for ($i = count($data) - 1; $i >= 0; $i--) { 1457 $builder->putOffset($data[$i]); 1458 } 1459 return $builder->endVector(); 1460 } 1461 1462 /** 1463 * @param FlatBufferBuilder $builder 1464 * @param int $numElems 1465 * @return void 1466 */ 1467 public static function startVectorOfStrongReferrablesVector(FlatBufferBuilder $builder, $numElems) 1468 { 1469 $builder->startVector(4, $numElems, 4); 1470 } 1471 1472 /** 1473 * @param FlatBufferBuilder $builder 1474 * @param ulong 1475 * @return void 1476 */ 1477 public static function addCoOwningReference(FlatBufferBuilder $builder, $coOwningReference) 1478 { 1479 $builder->addUlongX(39, $coOwningReference, 0); 1480 } 1481 1482 /** 1483 * @param FlatBufferBuilder $builder 1484 * @param VectorOffset 1485 * @return void 1486 */ 1487 public static function addVectorOfCoOwningReferences(FlatBufferBuilder $builder, $vectorOfCoOwningReferences) 1488 { 1489 $builder->addOffsetX(40, $vectorOfCoOwningReferences, 0); 1490 } 1491 1492 /** 1493 * @param FlatBufferBuilder $builder 1494 * @param array offset array 1495 * @return int vector offset 1496 */ 1497 public static function createVectorOfCoOwningReferencesVector(FlatBufferBuilder $builder, array $data) 1498 { 1499 $builder->startVector(8, count($data), 8); 1500 for ($i = count($data) - 1; $i >= 0; $i--) { 1501 $builder->putUlong($data[$i]); 1502 } 1503 return $builder->endVector(); 1504 } 1505 1506 /** 1507 * @param FlatBufferBuilder $builder 1508 * @param int $numElems 1509 * @return void 1510 */ 1511 public static function startVectorOfCoOwningReferencesVector(FlatBufferBuilder $builder, $numElems) 1512 { 1513 $builder->startVector(8, $numElems, 8); 1514 } 1515 1516 /** 1517 * @param FlatBufferBuilder $builder 1518 * @param ulong 1519 * @return void 1520 */ 1521 public static function addNonOwningReference(FlatBufferBuilder $builder, $nonOwningReference) 1522 { 1523 $builder->addUlongX(41, $nonOwningReference, 0); 1524 } 1525 1526 /** 1527 * @param FlatBufferBuilder $builder 1528 * @param VectorOffset 1529 * @return void 1530 */ 1531 public static function addVectorOfNonOwningReferences(FlatBufferBuilder $builder, $vectorOfNonOwningReferences) 1532 { 1533 $builder->addOffsetX(42, $vectorOfNonOwningReferences, 0); 1534 } 1535 1536 /** 1537 * @param FlatBufferBuilder $builder 1538 * @param array offset array 1539 * @return int vector offset 1540 */ 1541 public static function createVectorOfNonOwningReferencesVector(FlatBufferBuilder $builder, array $data) 1542 { 1543 $builder->startVector(8, count($data), 8); 1544 for ($i = count($data) - 1; $i >= 0; $i--) { 1545 $builder->putUlong($data[$i]); 1546 } 1547 return $builder->endVector(); 1548 } 1549 1550 /** 1551 * @param FlatBufferBuilder $builder 1552 * @param int $numElems 1553 * @return void 1554 */ 1555 public static function startVectorOfNonOwningReferencesVector(FlatBufferBuilder $builder, $numElems) 1556 { 1557 $builder->startVector(8, $numElems, 8); 1558 } 1559 1560 /** 1561 * @param FlatBufferBuilder $builder 1562 * @param byte 1563 * @return void 1564 */ 1565 public static function addAnyUniqueType(FlatBufferBuilder $builder, $anyUniqueType) 1566 { 1567 $builder->addByteX(43, $anyUniqueType, 0); 1568 } 1569 1570 public static function addAnyUnique(FlatBufferBuilder $builder, $offset) 1571 { 1572 $builder->addOffsetX(44, $offset, 0); 1573 } 1574 1575 /** 1576 * @param FlatBufferBuilder $builder 1577 * @param byte 1578 * @return void 1579 */ 1580 public static function addAnyAmbiguousType(FlatBufferBuilder $builder, $anyAmbiguousType) 1581 { 1582 $builder->addByteX(45, $anyAmbiguousType, 0); 1583 } 1584 1585 public static function addAnyAmbiguous(FlatBufferBuilder $builder, $offset) 1586 { 1587 $builder->addOffsetX(46, $offset, 0); 1588 } 1589 1590 /** 1591 * @param FlatBufferBuilder $builder 1592 * @param VectorOffset 1593 * @return void 1594 */ 1595 public static function addVectorOfEnums(FlatBufferBuilder $builder, $vectorOfEnums) 1596 { 1597 $builder->addOffsetX(47, $vectorOfEnums, 0); 1598 } 1599 1600 /** 1601 * @param FlatBufferBuilder $builder 1602 * @param array offset array 1603 * @return int vector offset 1604 */ 1605 public static function createVectorOfEnumsVector(FlatBufferBuilder $builder, array $data) 1606 { 1607 $builder->startVector(1, count($data), 1); 1608 for ($i = count($data) - 1; $i >= 0; $i--) { 1609 $builder->putSbyte($data[$i]); 1610 } 1611 return $builder->endVector(); 1612 } 1613 1614 /** 1615 * @param FlatBufferBuilder $builder 1616 * @param int $numElems 1617 * @return void 1618 */ 1619 public static function startVectorOfEnumsVector(FlatBufferBuilder $builder, $numElems) 1620 { 1621 $builder->startVector(1, $numElems, 1); 1622 } 1623 1624 /** 1625 * @param FlatBufferBuilder $builder 1626 * @return int table offset 1627 */ 1628 public static function endMonster(FlatBufferBuilder $builder) 1629 { 1630 $o = $builder->endObject(); 1631 $builder->required($o, 10); // name 1632 return $o; 1633 } 1634 1635 public static function finishMonsterBuffer(FlatBufferBuilder $builder, $offset) 1636 { 1637 $builder->finish($offset, "MONS"); 1638 } 1639} 1640