-
Notifications
You must be signed in to change notification settings - Fork 38
Home
Shuhei Tanuma edited this page Dec 24, 2013
·
30 revisions
php-protocolbuffers provides Fast and Robust protocol buffers serializer and deserializer into PHP.
- Linux like OS
- Windows
Standard types (numbers, string, enums, messages, etc) | supported |
Repeated fields | supported |
Packed attributes | supported |
Extensions | alpha |
Unknown fields | beta |
Service (RPC) | not supported yet |
64bit values | EXPERIMENTAL |
-
__sleep
and__wakeup
method support.
You can use above magic methods when enabling UseWakeupAndSleep flag. Be careful, this feature is not part of protocolbuffers specification.
these method will call when parseFromString
and serializeToString
(also supports ProtocolBuffers::decode
and ProtocolBuffers::encode
)
$phpoptions = $descriptor_builder->getOptions()->getExtension(ProtocolBuffers::PHP_MESSAGE_OPTION);
$phpoptions->setUseWakeupAndSleep(true); // default is off
$descriptor = $descriptor_builder->build();