public function serializePartialToString() {
    $enc = new Encoder();
    $this->outputPartial($enc);
    $res = $enc->toString();

    # Continue to be a little paranoid about the correctness of the protocol
    # buffer implementation.
    if (mt_rand(0, 99) === 0 && $this->byteSizePartial() !== strlen($res)) {
      throw new ProtocolBufferEncodeError(
        "Internal bug: Encoded size doesn't match predicted");
    }
    return $res;
  }
public function serializePartialToString() {
    $enc = new Encoder();
    $this->outputPartial($enc);
    $res = $enc->toString();

    # Continue to be a little paranoid about the correctness of the protocol
    # buffer implementation.
    if (mt_rand(0, 99) === 0 && $this->byteSizePartial() !== strlen($res)) {
      throw new ProtocolBufferEncodeError(
        "Internal bug: Encoded size doesn't match predicted");
    }
    return $res;
  }
public function serializePartialToString ( ) { $ enc = new Encoder ( ) ; $ this -> outputPartial ( $ enc ) ; $ res = $ enc -> toString ( ) ; # Continue to be a little paranoid about the correctness of the protocol # buffer implementation. if ( mt_rand ( 0 , 99 ) === 0 && $ this -> byteSizePartial ( ) !== strlen ( $ res ) ) { throw new ProtocolBufferEncodeError ( "Internal bug: Encoded size doesn't match predicted" ) ; } return $ res ; }
Serializes a protocol buffer that might not have all of the required fields
set.

@return string The serialized protocol buffer.
Serializes a protocol buffer that might not have all of the required fields set .