public function writeTo(WriteContext $context) { for ($this->rewind(); $this->valid(); $this->next()) { $extension = $this->current(); $value = $this->getInfo(); $extension->writeTo($context, $value); } }
/** * {@inheritdoc} */ public function writeTo(\Protobuf\WriteContext $context) { $stream = $context->getStream(); $writer = $context->getWriter(); $sizeContext = $context->getComputeSizeContext(); if ($this->extensions !== null) { $this->extensions->writeTo($context); } return $stream; }