Exemplo n.º 1
0
 /**
  * @param FlatBufferBuilder $builder
  * @param array offset array
  * @return int vector offset
  */
 public static function createTestarrayofboolsVector(FlatBufferBuilder $builder, array $data)
 {
     $builder->startVector(1, count($data), 1);
     for ($i = count($data) - 1; $i >= 0; $i--) {
         $builder->addBool($data[$i]);
     }
     return $builder->endVector();
 }
Exemplo n.º 2
0
 /**
  * @param FlatBufferBuilder $builder
  * @param array offset array
  * @return int vector offset
  */
 public static function createTestarrayofstring2Vector(FlatBufferBuilder $builder, array $data)
 {
     $builder->startVector(4, count($data), 4);
     for ($i = count($data) - 1; $i >= 0; $i--) {
         $builder->addOffset($data[$i]);
     }
     return $builder->endVector();
 }