Files
flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.php
tira-misu 2ad408697f [TS] Fix generation of struct members in object api (#7148)
* Fix C/C++ Create<Type>Direct with sorted vectors

If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".

* Changes due to code review

* Improve code readability

* Add generate of JSON schema to string to lib

* option indent_step is supported

* Remove unused variables

* Fix break in test

* Fix style to be consistent with rest of the code

* [TS] Fix reserved words as arguments (#6955)

* [TS] Fix generation of reserved words in object api (#7106)

* [TS] Fix generation of object api

* [TS] Fix MakeCamel -> ConvertCase

* [TS] Add test for struct of struct of struct

* Update generated files

* Add missing files

* [TS] Fix query of null/undefined fields in object api
2022-03-23 21:40:11 -07:00

56 lines
1.4 KiB
PHP

<?php
// automatically generated by the FlatBuffers compiler, do not modify
namespace MyGame\Example;
use \Google\FlatBuffers\Struct;
use \Google\FlatBuffers\Table;
use \Google\FlatBuffers\ByteBuffer;
use \Google\FlatBuffers\FlatBufferBuilder;
class StructOfStructsOfStructs extends Struct
{
/**
* @param int $_i offset
* @param ByteBuffer $_bb
* @return StructOfStructsOfStructs
**/
public function init($_i, ByteBuffer $_bb)
{
$this->bb_pos = $_i;
$this->bb = $_bb;
return $this;
}
/**
* @return StructOfStructs
*/
public function getA()
{
$obj = new StructOfStructs();
$obj->init($this->bb_pos + 0, $this->bb);
return $obj;
}
/**
* @return int offset
*/
public static function createStructOfStructsOfStructs(FlatBufferBuilder $builder, $a_a_id, $a_a_distance, $a_b_a, $a_b_b, $a_c_id, $a_c_distance)
{
$builder->prep(4, 20);
$builder->prep(4, 20);
$builder->prep(4, 8);
$builder->putUint($a_c_distance);
$builder->putUint($a_c_id);
$builder->prep(2, 4);
$builder->pad(1);
$builder->putSbyte($a_b_b);
$builder->putShort($a_b_a);
$builder->prep(4, 8);
$builder->putUint($a_a_distance);
$builder->putUint($a_a_id);
return $builder->offset();
}
}