• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/protobuf/responsebatch.php
  • Класс: BitrixPullProtobufResponseBatch
  • Вызов: ResponseBatch::writeTo
public function writeTo(ProtobufWriteContext $context)
    {
        $stream      = $context->getStream();
        $writer      = $context->getWriter();
        $sizeContext = $context->getComputeSizeContext();

        if ($this->responses !== null) {
            foreach ($this->responses as $val) {
                $writer->writeVarint($stream, 10);
                $writer->writeVarint($stream, $val->serializedSize($sizeContext));
                $val->writeTo($context);
            }
        }

        if ($this->extensions !== null) {
            $this->extensions->writeTo($context);
        }

        return $stream;
    }