This commit is contained in:
Wouter van Oortmerssen
2016-04-04 16:55:25 -07:00
11 changed files with 114 additions and 38 deletions

View File

@@ -98,6 +98,14 @@ class Monster extends Table
return $o != 0 ? $this->__vector_len($o) : 0;
}
/**
* @return string
*/
public function getInventoryBytes()
{
return $this->__vector_as_bytes(14);
}
/**
* @return sbyte
*/
@@ -210,6 +218,14 @@ class Monster extends Table
return $o != 0 ? $this->__vector_len($o) : 0;
}
/**
* @return string
*/
public function getTestnestedflatbufferBytes()
{
return $this->__vector_as_bytes(30);
}
public function getTestempty()
{
$obj = new Stat();

View File

@@ -128,6 +128,7 @@ function test_buffer(Assert $assert, Google\FlatBuffers\ByteBuffer $bb) {
}
$assert->strictEqual($invsum, 10);
$assert->strictEqual(bin2hex($monster->GetInventoryBytes()), "0001020304");
$test_0 = $monster->GetTest4(0);
$test_1 = $monster->GetTest4(1);