• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/protobuf/incomingmessage.php
  • Класс: BitrixPullProtobufIncomingMessage
  • Вызов: IncomingMessage::merge
public function merge(ProtobufMessage $message)
    {
        if ( ! $message instanceof BitrixPullProtobufIncomingMessage) {
            throw new InvalidArgumentException(sprintf('Argument 1 passed to %s must be a %s, %s given', __METHOD__, __CLASS__, get_class($message)));
        }

        $this->receivers = ($message->receivers !== null) ? $message->receivers : $this->receivers;
        $this->sender = ($message->sender !== null) ? $message->sender : $this->sender;
        $this->body = ($message->body !== null) ? $message->body : $this->body;
        $this->expiry = ($message->expiry !== null) ? $message->expiry : $this->expiry;
        $this->type = ($message->type !== null) ? $message->type : $this->type;
    }