1 <?php 2 // automatically generated by the FlatBuffers compiler, do not modify 3 4 use \Google\FlatBuffers\Struct; 5 use \Google\FlatBuffers\Table; 6 use \Google\FlatBuffers\ByteBuffer; 7 use \Google\FlatBuffers\FlatBufferBuilder; 8 9 class Rapunzel extends Struct 10 { 11 /** 12 * @param int $_i offset 13 * @param ByteBuffer $_bb 14 * @return Rapunzel 15 **/ 16 public function init($_i, ByteBuffer $_bb) 17 { 18 $this->bb_pos = $_i; 19 $this->bb = $_bb; 20 return $this; 21 } 22 23 /** 24 * @return int 25 */ 26 public function GetHairLength() 27 { 28 return $this->bb->getInt($this->bb_pos + 0); 29 } 30 31 32 /** 33 * @return int offset 34 */ 35 public static function createRapunzel(FlatBufferBuilder $builder, $hairLength) 36 { 37 $builder->prep(4, 4); 38 $builder->putInt($hairLength); 39 return $builder->offset(); 40 } 41 } 42