Home | History | Annotate | Download | only in union_vector
      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 BookReader extends Struct
     10 {
     11     /**
     12      * @param int $_i offset
     13      * @param ByteBuffer $_bb
     14      * @return BookReader
     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 GetBooksRead()
     27     {
     28         return $this->bb->getInt($this->bb_pos + 0);
     29     }
     30 
     31 
     32     /**
     33      * @return int offset
     34      */
     35     public static function createBookReader(FlatBufferBuilder $builder, $booksRead)
     36     {
     37         $builder->prep(4, 4);
     38         $builder->putInt($booksRead);
     39         return $builder->offset();
     40     }
     41 }
     42