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

Breadcrumb

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

function FieldOptions::setPacked

The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding.

Generated from protobuf field <code>optional bool packed = 2;</code>

Parameters

bool $var:

Return value

$this

File

vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php, line 266

Class

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

Namespace

Google\Protobuf\Internal

Code

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

API Navigation

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