112 public function readFrom(\Protobuf\ReadContext $context)
114 $reader = $context->getReader();
115 $length = $context->getLength();
116 $stream = $context->getStream();
118 $limit = ($length !==
null)
119 ? ($stream->tell() + $length)
122 while ($limit ===
null || $stream->tell() < $limit) {
124 if ($stream->eof()) {
128 $key = $reader->readVarint($stream);
129 $wire = \Protobuf\WireFormat::getTagWireType($key);
130 $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
132 if ($stream->eof()) {
139 if ($extension !==
null) {
140 $this->
extensions()->add($extension, $extension->readFrom($context, $wire));
149 $data = $reader->readUnknown($stream, $wire);
150 $unknown = new \Protobuf\Unknown($tag, $wire, $data);