示例#1
0
 function setUp()
 {
     $codec = new Codec\Binary();
     Protobuf\Protobuf::setDefaultCodec($codec);
     $this->bin_simple = file_get_contents(dirname(__DIR__) . '/protos/simple.bin');
     $this->bin_book = file_get_contents(dirname(__DIR__) . '/protos/addressbook.bin');
     $this->bin_repeated_string = file_get_contents(dirname(__DIR__) . '/protos/repeated-string.bin');
     $this->bin_repeated_int32 = file_get_contents(dirname(__DIR__) . '/protos/repeated-int32.bin');
     $this->bin_repeated_nested = file_get_contents(dirname(__DIR__) . '/protos/repeated-nested.bin');
     $this->bin_ext = file_get_contents(dirname(__DIR__) . '/protos/extension.bin');
 }