function write()

in Aliyun/Log/log.proto.php [328:352]


  function write($fp) {
    if (!$this->validateRequired())
      throw new Exception('Required fields are missing');
    if (!is_null($this->logs_))
      foreach($this->logs_ as $v) {
        fwrite($fp, "\x0a");
        Protobuf::write_varint($fp, $v->size()); // message
        $v->write($fp);
      }
    if (!is_null($this->reserved_)) {
      fwrite($fp, "\x12");
      Protobuf::write_varint($fp, strlen($this->reserved_));
      fwrite($fp, $this->reserved_);
    }
    if (!is_null($this->topic_)) {
      fwrite($fp, "\x1a");
      Protobuf::write_varint($fp, strlen($this->topic_));
      fwrite($fp, $this->topic_);
    }
    if (!is_null($this->source_)) {
      fwrite($fp, "\"");
      Protobuf::write_varint($fp, strlen($this->source_));
      fwrite($fp, $this->source_);
    }
  }