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

Breadcrumb

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

function Location::getPath

Identifies which part of the FileDescriptorProto was defined at this location. Each element is a field number or an index. They form a path from the root FileDescriptorProto to the place where the definition occurs. For example, this path: [ 4, 3, 2, 7, 1 ] refers to: file.message_type(3) // 4, 3 .field(7) // 2, 7 .name() // 1 This is because FileDescriptorProto.message_type has field number 4: repeated DescriptorProto message_type = 4; and DescriptorProto.field has field number 2: repeated FieldDescriptorProto field = 2; and FieldDescriptorProto.name has field number 1: optional string name = 1; Thus, the above path gives the location of a field name. If we removed the last element: [ 4, 3, 2, 7 ] this path refers to the whole field declaration (from the beginning of the label to the terminating semicolon).

Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>

Return value

\Google\Protobuf\Internal\RepeatedField

File

vendor/google/protobuf/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php, line 210

Class

Location
Generated from protobuf message <code>google.protobuf.SourceCodeInfo.Location</code>

Namespace

Google\Protobuf\Internal\SourceCodeInfo

Code

public function getPath() {
    return $this->path;
}

API Navigation

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