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

Breadcrumb

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

function GeneratedCodeInfo::setAnnotation

An Annotation connects some span of text in generated code to an element of its generating .proto file.

Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>

Parameters

array<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>|\Google\Protobuf\Internal\RepeatedField $var:

Return value

$this

File

vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo.php, line 66

Class

GeneratedCodeInfo
Describes the relationship between generated code and its original source file. A GeneratedCodeInfo message is associated with only one generated source file, but may contain references to different source .proto files.

Namespace

Google\Protobuf\Internal

Code

public function setAnnotation($var) {
    $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation::class);
    $this->annotation = $arr;
    return $this;
}
RSS feed
Powered by Drupal