Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MessageOptions.php

function MessageOptions::setMessageSetWireFormat

Set true to use the old proto1 MessageSet wire format for extensions. This is provided for backwards-compatibility with the MessageSet wire format. You should not use this for any other reason: It's less efficient, has fewer features, and is more complicated. The message must be defined exactly as follows: message Foo { option message_set_wire_format = true; extensions 4 to max; } Note that the message cannot have any defined fields; MessageSets only have extensions. All extensions of your type must be singular messages; e.g. they cannot be int32s, enums, or repeated messages. Because this is an option, the above two restrictions are not enforced by the protocol compiler.

Generated from protobuf field <code>optional bool message_set_wire_format = 1 [default = false];</code>

Parameters

bool $var:

Return value

$this

File

vendor/google/protobuf/src/Google/Protobuf/Internal/MessageOptions.php, line 223

Class

MessageOptions
Generated from protobuf message <code>google.protobuf.MessageOptions</code>

Namespace

Google\Protobuf\Internal

Code

public function setMessageSetWireFormat($var) {
    GPBUtil::checkBool($var);
    $this->message_set_wire_format = $var;
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal